Content service aggregation system

ABSTRACT

A network content service apparatus includes a set of compute elements adapted to perform a set of network services; and a switching fabric coupling compute elements in said set of compute elements. The set of network services includes firewall protection, Network Address Translation, Internet Protocol forwarding, bandwidth management, Secure Sockets Layer operations, Web caching, Web switching, and virtual private networking. Code operable on the compute elements enables the network services, and the compute elements are provided on blades which further include at least one input/output port.

CLAIM OF PRIORITY

This application is a Continuation of U.S. application Ser. No.11/983,135, filed Nov. 7, 2007, which is a Continuation of U.S.application Ser. No. 10/191,742, filed Jul. 8, 2002, which claims thebenefit of U.S. Provisional Application No. 60/303,354, filed Jul. 6,2001, the entire content of each of which is incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is directed to a system for implementing amultifunction network service apparatus.

2. Description of the Related Art

The worldwide system of computer networks known as the Internet hasprovided business and individuals with a new mechanism for supplyinggoods and services, and conducting commerce. As the number and type ofnetwork services used on the Internet have grown, so has the strain thatproviding such services places on businesses. As the number, complexityand interaction of inter-networked services has risen, the associatedcosts of building and maintaining a network infrastructure to supportthose services have grown as well. Many enterprises have thus turnedoutsourced vendors, sometimes called managed service providers or datacenters, to provide these services in lieu of building and maintainingthe infrastructure themselves. Customers of such managed serviceproviders are often called subscribers.

The managed service provider can operate in many different ways.Typically it can provide secure facilities where the infrastructureservice equipment is located, and manage equipment for the subscriber.The scope of management and services is defined by an agreement with thesubscriber calling for the managed service provider to solely or jointlymanage the equipment with the subscriber. This is sometimes referred toas “co-location”. In other cases, the managed service provider can leasethe physical space from another provider (called a hosting provider) andprovide just the management of the infrastructure equipment on behalf ofits subscribers.

A data center is a specialized facility that houses Web sites andprovides data serving and other services for subscribers. The datacenter may contain a network operations center (NOC), which is arestricted access area containing automated systems that constantlymonitor server activity, Web traffic, and network performance. A datacenter in its most simple form may consist of a single facility thathosts all of the infrastructure equipment. However, a more sophisticateddata center is normally an organization spread throughout the world withsubscriber support equipment located in various physical hostingfacilities.

Data centers allow enterprises to provide a number of different types ofservices, including e-commerce services to customers; extranets andsecure Virtual Private Networks (VPNs) to employees and customers;firewall protection and Network Address Translation (NAT) services, Webcaching and load balancing services, as well as many others. Theseservices can all be provided at an off-site facility in the data centerwithout requiring the enterprise to maintain the facility itself.

A typical data center facility will house physical hardware in a numberof equipment racks, generally known as “cages”, which hold networkingequipment and servers which are operated by the data center on behalf ofthe subscriber. Generally, the subscriber maintains the content andcontrol over the servers, while contracting with the data center toprovide services such as maintenance and service configuration. Itshould be well understood that there are myriad ways in whichsubscribers can arrange their relationships with data centers.

The equipment that provides the infrastructure services for a set ofsubscribers can take several forms. Depending on the complexity andvariety of services required, the equipment generally includes one ormore single function devices dedicated to the subscriber. Generally,because the devices are designed with the co-location model inmind—customers leasing rack space and pieces of equipment asneeded—service devices generally include the ability to provide only oneor a few services via the device. Typical multi-function devices that docombine services combine those that are closely related, such as NAT andfirewall services. A data center facility generally has a number ofdevices to manage, and in many case the devices multiply as redundantdevices may be used for fail over security to provide fault-tolerance orfor load balancing.

Normally, services such as NAT, Firewall and VPN are provided byspecialized computers or special function appliances at the subscriberssite. In offloading the services to a data center, the data center willuse specialized appliances or servers coupled to the subscribers Webservers in the cages to implement special functions for the subscribers.These appliances can include service provision devices and thesubscriber's application servers as well as other specialized equipmentfor implementing the subscriber's service structure. The cages may thusinclude network appliances dedicated to one or more of the followingtasks: routing, firewall, network address translation, Secure SocketsLayer (SSL) acceleration, virtual private networking, public keyinfrastructure (PKI), load balancing, Web caching, or the like. As aresult, the management of all subscribers within the data center becomesvery complex and expensive with many different management interfaces forall of the subscribers and subscriber devices. Administering theequipment in each cage is generally accomplished via an administrativeaccess interface coupled to each single function device. An example ofone prior art architecture used in a data center is shown in FIG. 1. Inthis example, a plurality of individual service appliances 24, eachproviding a different type of IP service, are coupled to a network 20(in this case it is the Internet) and a local LAN 21, which is a highspeed local network secure within the data center. The local LAN maycouple each of the appliances to each other, as well as varioussubscriber servers 25. Each of the individual appliances 24 performsonly some limited form of processing which is specific to the servicefunction it is designed to provide. In addition, this type ofarchitecture is difficult to manage since each device 24 has its ownconfiguration interface 26. All service set-up parameters must be madewithin each device. Indeed, each appliance may be provided by adifferent manufacturer and hence have its own configuration paradigm.

In general, each of these appliances 24 works on network data packetscarried in the network using TCP/IP protocol. The data is routed betweenappliances using the full TCP/IP stack, requiring that each applianceprocess the entire stack in order to apply the service that theappliance is designed to provide. This results in a large degree ofprocessing overhead just in dealing with the transmission aspects of thedata. To combat these problems, some network equipment manufacturershave built multi-service devices capable of providing additional IPlevel services in one physical package. Typically, however, thesedevices couple network coupled “line cards” designed to provide theparticular value added service to the network with some form of centralprocessor, with the combination being generally organized intomulti-service routing device. The compute elements on the line cardshave limited or specialized processing capability, and all servicesset-up and advanced processing must go through the central processingcard. Such service set-up is sometimes called “slow path” processing,referring to that occurs infrequently or is complex, such as exceptionpacket handling, while more routine functions are performed by theappliances themselves.

An example of this type of system is shown in FIG. 2. In the systemshown in FIG. 2, a central processor 30 controls and performs allservice implementation functions, with some routing via other appliancescoupled to the fabric. In this architecture, the service processing islimited to the speed and throughput of the processor.

An important drawback to the systems of the prior art such as thoseshown in FIG. 1 and FIG. 2 is that processing of application servicesrequires each line card to perform the full IP stack functions. That is,each card must perform IP processing and routing to perform the networkservice on the data carried by the IP packet. Any packet entering theline card must be processed through the IP, TCP and HTTP level, the dataprocessed, and the packet re-configured with proper TCP and IPinformation before being forwarded on.

A second important drawback of these systems is that they performprocessing on only one flow of packets at a time. That is, the centralprocessor of the embodiment of FIG. 2 is a bottleneck for systemperformance.

SUMMARY OF THE INVENTION

The invention, roughly described, comprises an architecture forcontrolling a multiprocessing system to provide a network service tonetwork data packets using a plurality of compute elements. In oneaspect, a single service is provided by multiple compute elements. In asecond aspect, multiple services are provided by multiple elements. Inone embodiment, the invention may comprise a management compute elementincluding service set-up information for at least one service; and atleast one processing compute element communicating service set-upinformation with the management compute element in order to performservice specific operations on data packets. This embodiment may furtherinclude a flow element, directing data packets to the at least oneprocessing compute element.

The system control architecture providing multiple network IP servicesto networked data in a multiprocessing system, the multiprocessingsystem having a plurality of compute elements, comprising code providedon a first compute element causing the compute element to function as acontrol compute element maintaining multi-service management informationand service configuration instructions; and service processing codeprovided on at least a second compute element causing said secondcompute element to function as a service processing element performingservice specific instructions responsive to the control compute elementon data transmitted to the service processing element.

The system control architecture of claim 2 further including code,provided on a third compute element, causing said third compute elementto function as a flow stage compute element communicating with thecontrol compute element and the service processing element.

In a further aspect, the system may comprise a method of controlling aprocessing system including a plurality of processors. The method mayinclude the steps of operating at least one of said processing units asa control authority including service provisioning information for asubscriber; and operating a set of processors as service specificcompute elements responsive to the control authority, receivingprovisioning information from the subscriber and performing servicespecific instructions on data packets to provide content services. Inthis embodiment, data packets having common attributes including acommon subscriber may be (but need not be) organized in a flow andprocessed by the set of processors, with each flow being bound to thesame set of processors. Each subscriber may have multiple flows.

In a still further embodiment of the invention, a method of operating amultiprocessor system is disclosed. The method may comprise operating atleast one processor as a control authority storing information onconfiguration of a plurality of network services, operating at least asecond processor as a compute element for one of said services, andtransmitting selected information on the configuration of the servicesto the compute element to operate the compute element to performcalculations on the service.

In a still further aspect, the invention may comprise system forprocessing content services using a processing pipeline in amulti-processor system. In this embodiment, the invention includes atleast one processor comprising a Control Authority having servicespecific data and instructions; a plurality of service specificprocessors arranged in a processing pipeline and coupled by a switchingfabric, communicating with the Control Authority to receive set-upinformation and perform service specific instructions on packet data;and a flow processor directing network traffic to the service specificprocessors. In this embodiment, the data input to the architecture isorganized as a flow, and each flow is bound to a processing pipeline forservice specific operations.

The present invention can be accomplished using hardware, software, or acombination of both hardware and software. The software used for thepresent invention is stored on one or more processor readable storagemedia including hard disk drives, CD-ROMs, DVDs, optical disks, floppydisks, tape drives, RAM, ROM or other suitable storage devices. Inalternative embodiments, some or all of the software can be replaced bydedicated hardware including custom integrated circuits, gate arrays,FPGAs, PLDs, and special purpose computers.

These and other objects and advantages of the present invention willappear more clearly from the following description in which thepreferred embodiment of the invention has been set forth in conjunctionwith the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described with respect to the particularembodiments thereof. Other objects, features, and advantages of theinvention will become apparent with reference to the specification anddrawings in which:

FIG. 1 depicts a first prior art system for providing a plurality ofnetwork services to a subscriber.

FIG. 2 depicts a second prior art system for providing a plurality ofnetwork services to a subscriber.

FIG. 3 depicts a general hardware embodiment suitable for use with theservice provision architecture of the present invention

FIG. 4 depicts a second hardware embodiment suitable for use with theservice provision architecture of the present invention.

FIG. 5 is a block diagram illustrating the software system architectureof the control system of the present invention.

FIG. 6 a is a block diagram illustrating the fast path and slow pathprocessing of packets in the system of the present invention.

FIG. 6 b is a diagram illustrating one of the data structures used inthe system of the present invention.

FIG. 7 a is a block diagram depicting the functional software modulesapplied to various processors on a dedicated processing pipeline inaccordance with the present invention.

FIG. 7 b is a block diagram depicting functional software modulesapplied to various processors in an input/output pipe in accordance withthe present invention.

FIG. 8 is a flowchart depicting processes running in a processingelement designated as a control authority processor and theclassification of traffic to processes running in the control authorityprocessor.

FIG. 9 is a flowchart depicting the flow classification utilized by oneinput processing element to classify a flow of data packets inaccordance with the present invention.

FIG. 10 is a flowchart depicting processing occurring in a virtualprivate network processing stage of the system of the present invention.

FIG. 11 is a flowchart depicting processing occurring in one pipeline ofprocessing elements in accordance with the system of the presentinvention.

FIG. 12 is a block level overview of VPN processing occurring in thesystem of the present invention and the communication between variousstages and modules.

FIG. 13 is a flowchart representing processing in accordance with theVPN processing stage using IKE and PKI.

FIG. 14 is a flowchart representing processing of a packet aftercompletion of the encryption and decryption in the packet processingstage of FIG. 13.

FIG. 15 is a diagram illustrating the data structures configured by theBSD processors running in the control authority.

FIG. 15 a is a diagram illustrating the virtual routing functions of thesystem of the present invention.

FIG. 16 illustrates a multi-processor unit in accordance with thepresent invention.

FIG. 17 illustrates a process employed by the multi-processor unit inFIG. 16 to exchange data in accordance with the present invention.

FIG. 18 shows a processing cluster employed in one embodiment of themulti-processor unit in FIG. 16.

FIG. 19 shows a processing cluster employed in another embodiment of themulti-processor unit in FIG. 16.

FIG. 20 a illustrates a first tier data cache pipeline in one embodimentof the present invention.

FIG. 20 b illustrates a first tier instruction cache pipeline in oneembodiment of the present invention.

FIG. 21 illustrates a second tier cache pipeline in one embodiment ofthe present invention.

FIG. 22 illustrates further details of the second tier pipeline shown inFIG. 21.

FIG. 23 a illustrates a series of operations for processing networkpackets in one embodiment of the present invention.

FIG. 23 b illustrates a series of operations for processing networkpackets in an alternate embodiment of the present invention.

FIGS. 24 a-24 c show embodiments of a coprocessor for use in aprocessing cluster in accordance with the present invention.

FIG. 25 shows an interface between a CPU and the coprocessors in FIGS.24 a-24 c.

FIG. 26 shows an interface between a sequencer and application enginesin the coprocessors in FIGS. 24 a-24 c.

FIG. 27 shows one embodiment of a streaming input engine for thecoprocessors shown in FIGS. 24 a-24 c.

FIG. 28 shows one embodiment of a streaming output engine for thecoprocessors shown in FIGS. 24 a-24 c.

FIG. 29 shows one embodiment of alignment circuitry for use in thestreaming output engine shown in FIG. 28.

FIG. 30 shows one embodiment of a reception media access controllerengine in the coprocessor shown in FIG. 24 c.

FIG. 31 illustrates a packet reception process in accordance with thepresent invention.

FIG. 32 shows a logical representation of a data management scheme forreceived data packets in one embodiment of the present invention.

FIG. 33 shows one embodiment of a transmission media access controllerengine in the coprocessors shown in FIG. 24 c.

FIG. 34 illustrates a packet transmission process in accordance with oneembodiment of the present invention.

FIG. 35 illustrates a packet transmission process in accordance with analternate embodiment of the present invention.

FIG. 36 depicts a system employing cross-bar switches in accordance withthe present invention.

FIG. 37 shows one embodiment of a cross-bar switch in accordance withthe present invention.

FIG. 38 shows a process employed by a cross-bar switch in accordancewith the present invention.

FIG. 39 illustrates an alternate embodiment of a cross-bar in accordancewith the present invention.

FIG. 40 depicts a block diagram for an input port in the cross-barswitches shown in FIGS. 37 and 39.

FIG. 41 depicts a block diagram for a sink port in the cross-barswitches shown in FIGS. 37 and 39.

FIG. 42 shows a process employed by the sink port depicted in FIG. 41for accepting and storing data.

FIG. 43 shows a block diagram for the multi-sink port depicted in FIG.39.

FIG. 44 shows a process employed by the multi-sink port depicted in FIG.43 for transferring packet data to sink ports.

FIG. 45 illustrates a bandwidth allocation process employed by across-bar switch in accordance with the present invention.

DETAILED DESCRIPTION I. Control Architecture

The present invention provides an architecture for controlling a contentservices aggregator—a device which provides a number of networkservices. The architecture is designed to provide the services on amulti-processor system. In one aspect, the invention comprises asoftware architecture comprised of an operating paradigm optimized forpacket routing and service processing using multiple compute elementscoupled through a switching fabric and control backplane.

Various embodiments of the present invention will be presented in thecontext of multiple hardware architectures. It should be recognized thatthe present invention is not limited to use with any particularhardware, but may be utilized with any multiple compute elementarchitecture allowing for routing of packets between compute elementsrunning components of the invention as defined herein.

In the following detailed description, the present invention isdescribed by using flow diagrams to describe either the structure or theprocessing that implements the method of the present invention. Usingthis manner to present the present invention should not be construed aslimiting of its scope. The present invention contemplates both methodsand systems for controlling a multiprocessor system, for implementingcontent services to a multitude of subscribers coupled to themultiprocessing system, and for distributing the provision of suchservices across a number of compute elements. In one embodiment, thesystem and method of the invention can be implemented on general-purposecomputers. The currently disclosed system architecture may also beimplemented with a number of special purpose systems.

Embodiments within the scope of the present invention also includearticles of manufacture comprising program storage apparatus and havingencoded therein program code. Such program storage apparatus can be anyavailable media which can be accessed by a general purpose or specialpurpose computer. By way of example, and not limitation, such programstorage apparatus can comprise RAM, ROM, EEPROM, CD-ROM or other opticaldisk storage, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired program codeand which can be accessed by a general purpose or special purposecomputer. Combinations of any of the above are also included within thescope of such program storage means.

Program code comprises, for example, executable instructions and datawhich causes a general purpose or special purpose computer to perform acertain function or functions.

A. Overview

The software architecture of the present invention provides variouscontent based networking services to subscribers in a networkenvironment. In one embodiment, the system architecture of the presentinvention is designed to run on processing hardware which is located ina network configuration between a physical layer interface switch and a“Layer 2” IP switch. The architecture supports multiple subscribers andmultiple subscriber services in accordance with the invention.

A general hardware architecture on which the software architecture ofthe present invention may be implemented is shown in FIG. 3. As showntherein, a plurality of compute elements are coupled to a switchingfabric to allow packets to traverse the fabric and be routed throughmeans discussed below to any other compute element coupled to thefabric. It should be understood that the hardware shown in FIG. 3 maycomprise a portion of a content service aggregation, but does notillustrate components of the aggregator such as I/O ports, busses andnetwork interfaces which would be used in such aggregators.

In general, packets enter the system via the input elements, getswitched via the fabric and travel through one or more compute elementswhere the services are rendered and exit via the output elements. Thefunction of the control system of the present invention is to route datapackets internally within the system, maintain the data structures whichallow the services provided by the content services aggregation deviceto be performed, and coordinate the flows of data through the system.

When implemented with a multiprocessor device such as that shown in FIG.3, the control architecture of the present invention provides a contentservice aggregator which distributes service provision over a pluralityof compute elements in order to increase the processing performance ofthe device beyond that presently known in the art. In combination withthis distributed processing, any number of compute elements may beprovided.

In the depiction shown in FIG. 3, each compute element may comprise oneor more microprocessors, including any commercially availablemicroprocessor. Alternatively, the compute elements may comprise one ormore application-specific integrated circuit processors specificallydesigned to process packets in accordance with the network service whichthe content service aggregator is designed to provide. Each computeelement in FIG. 3 includes at least a processing unit, such as a CPU. Asdiscussed below, each compute element may include a number of CPUs andfunction specific processing engines. Not detailed in FIG. 3 bututilized in the present invention is some form of addressable memory. Inthe implementation of FIG. 3, the memory may be incorporated into thecompute elements themselves, or provided separately and may be memorydedicated to and accessible by one processor or memory shared by manyprocessors.

In FIG. 3, certain elements have been designated as “input elements”,other elements have been designated as “output elements”, while stillother elements have been designed as simply “compute” elements. As willbecome clear after the reading of the specification, the designation ofthe elements as input, output or compute elements is intended to enablethe reader to understand that certain elements have functions which areimplemented by the software architecture of the present invention ascontrolling processing flow (the input/output elements) and performingservice provisioning.

FIG. 4 shows a more specialized hardware configuration that is suitablefor use with the system of the present invention. In this particularembodiment, the computer elements 100 are a series of multi-CPU computeelements, such as multi-processor unit 2010 disclosed below withreference to FIGS. 16-35. Briefly, each element contains a plurality ofCPUs, application specific processing engines, a shared memory, asequencer and a MAC.

In addition, the switching fabric is comprised of a plurality ofcross-bar switching elements 200, such as cross-bar switches 3010 and3110 described below with reference to FIGS. 36-45.

In order to implement a content service aggregation device using theembodiment of FIG. 4, a plurality of compute elements 100 are organizedonto a processing pipeline or “blade”. Each blade may comprise aphysical card having a series of connectors and connections, includingwiring interconnecting the compute elements and at least one cross barelement 200 to a connection plane and other such blades. In FIG. 4, thesystem may include two processor pipelines, each having five computeelements and one switching element provided thereon, as well as an inputoutput blade including three compute elements and one switching element200. The input/output pipeline processing elements 100 are coupled to agigabit Ethernet connection.

It should be recognized that the compute elements need not be providedon the blades, and that different configurations of input/output schemesare possible. In a further embodiment, the content services aggregatormay include two input blades and two processing blades or any number ofprocessing and input blades.

Each blade includes a series of packet path data connections 115,control path connections 105 and combined data and control connections110. The collection of compute elements on a single blade provides aprocessing pipeline for providing the content services. It should berecognized that the processing pipeline need not be physically separatedon a blade in any particular configuration, but may comprise a series ofprocessors linked by a crossbar switch, a grouping of crossbar switches,or other switching fabric capable of routing packets in the mannerspecified in the instant application to any of the various computeelements coupled to the switch.

As noted above, the hardware suitable for running the system of thepresent invention may comprise any multi-processor system havingaddressable memory operatively coupled to each processor. However, thecompute elements shown in FIG. 4, as well as multi-processor unit 2010described below, each include a central processing unit coupled to acoprocessor application engine. The application engines are specificallysuited for servicing applications assigned to the compute engine. Thisenables different compute engines to be optimized for servicing a numberof different applications the content service aggregator will provide.For example, one compute engine may contain coprocessor applicationengines for interfacing with a network, while other coprocessors includedifferent application engines. The coprocessors also offload associatedcentral processing units from processing assigned applications. Thecoprocessors perform the applications, leaving the central processingunits free to manage the allocation of applications. The coprocessorsare coupled to a cache memory to facilitate their applicationprocessing. Coprocessors exchange data directly with cachememory—avoiding time consuming main memory transfers found inconventional computer systems. The multi-processor also couples cachememories from different compute engines, allowing them to exchange datadirectly without accessing main memory.

As such, the architecture shown in FIG. 4 is particularly suited for usein a content service aggregation device and, in accordance with theparticular implementations shown in the co-pending applications,provides a high throughput system suitable for maintaining a largenumber of subscribers in a data center.

Although the particular type of hardware employed in running thesoftware architecture of the present invention is not intended to belimiting on the scope of the software control architecture of thepresent invention, the invention will be described with respect to itsuse in a hardware system employing a configuration such as that shown inFIG. 4, where the compute elements are multi-processor unit 2010,described below with reference to FIGS. 16-35, and the cross-bar fabricelements are cross-bar switches 3010 or 3110, described below withreference to FIGS. 36-45.

The control system of the present invention takes into account the factthat communication overhead between any two elements is not the same andbalances the process for best overall performance. The control systemallows for a dynamically balanced throughput, memory usage and computeelement usage load among the available elements, taking into account theasymmetric communications costs. The architecture also scales well foradditional processors and groups of processors. The architecture canhost as few as a single subscriber and as many as several thousandsubscribers in an optimal fashion and handles dynamic changes insubscribers and the bandwidth allocated to them.

There are a number of different types of traffic which are recognized bythe system of the present invention, including local traffic, remotetraffic, control traffic and data traffic, as well as whether thetraffic is inbound to the content services aggregator or outbound fromthe aggregator. The processors of FIG. 3 and the processing pipelines ofFIG. 4 may handle these flows differently in accordance with the systemof the invention.

In one embodiment, each input/output processor on the blade may have alocal and a remote port with Gigabit Ethernet interfaces. The interfacesfall under one of the following categories: local port, remote port;trusted management port; port mirror or inter-device RP. Local portsconnect to a trusted side of the device's traffic flow (i.e. a cage-sideor the subscriber-side) and hence have “local” traffic. Remote portsconnect to the un-trusted side (the internet side) of the device'straffic flow. A trusted management port is the out of band managementport used to access the content services aggregator and is physicallysecured. Data on this port has no access control and no firewalls areapplied to traffic coming in from this port. An inter-device RP port isused to connect two content services aggregators in redundant mode. Portmirror is a debug feature that duplicates the traffic of a local orremote port for debugging purposes.

B. Software Hierarchy

As shown in FIG. 5, the software architecture is a four layer hierarchywhich may include: an operating system layer 305, an internet protocol(IP) stack 320, a service architecture layer 330 and a network serviceslayer 360. Each layer has a number of sub-components as detailed below.The top layer is the content application services layer which includesmodules implementing the various IP services. Those listed in FIG. 5 areFirewall, Network Address Translation, IP Forwarding (OSPF Routing),bandwidth management, Secure Sockets Layer processing, Web (or Layer 7)content based switching, Virtual Private Networking using IPSec, and Webcaching. It should be understood that the number and type of Webservices which may be provided in accordance with the architecture ofthe present invention are not limited to those shown in FIG. 5, andthose listed and described herein are for purposes of example.Additional services may be added to those shown in FIG. 5 and in anyparticular implementation, all services shown in FIG. 5 need not beimplemented.

In one embodiment, each processing compute element is configured to runwith the same software configuration, allowing each processing computeelement to be used dynamically for any function described herein. In analternative embodiment, each compute element is configured with softwaretailored to the function is designated to perform. For example, if acompute element is used in providing a particular service, such as SSL,the processing compute element will only require that code necessary toprovide that service function and other content services codes need notbe loaded on that processor. The code can be provided by loading animage of the code at system boot under the control of a ControlAuthority processor. It should be further understood that, in accordancewith the description set forth in co-pending U.S. patent applicationSer. No. 09/900,481, filed Jul. 6, 2001 by Fred Gruner, David Hass,Robert Hathaway, Ramesh Penwar, Ricardo Ramirez, and Nazar Zaidi,entitled MULTI-PROCESSOR SYSTEM {Attorney Docket Number:NEXSI-01020US0}, the compute elements may be tailored to provide certaincomputational aspects of each service in hardware, and each servicemodule 360 and service architecture module 330 may be constructed totake advantage of the particular hardware configuration on which it isused.

Shown separate from the architecture stack and running on one or morecompute elements, is a NetBSD implementation that serves as the ControlAuthority for the system of the present invention. As will be understoodto one of average skill in the art, NetBSD is a highly portableunix-like operating system. The NetBSD implementation provides supportand control for the content services running in the content servicesaggregator. Although in one implementation, a single instance of NetBSDrunning on a single processing CPU may be utilized, in order to providea high throughput for the content services aggregator, multipleinstances of NetBSD are preferably utilized in accordance with theinvention. Such multiple instances may be provided on multipleprocessors, or, when the system is utilized with the compute element ofco-pending U.S. patent application Ser. No. 09/900,481, filed Jul. 6,2001 by Fred Gruner, David Hass, Robert Hathaway, Ramesh Penwar, RicardoRamirez, and Nazar Zaidi, entitled MULTI-PROCESSOR SYSTEM {AttorneyDocket Number: NEXSI-01020US0}, multiple copies of NetBSD may beprovided on a single compute element.

In both examples, the single or multiple copies of NetBSD running on asingle or multiple CPUs respectively, comprise the “Control Authority”and control the operation of the system as a whole. In oneimplementation, eight copies of NetBSD are run on the compute element ofco-pending U.S. patent application Ser. No. 09/900,481, filed Jul. 6,2001 by Fred Gruner, David Hass, Robert Hathaway, Ramesh Penwar, RicardoRamirez, and Nazar Zaidi, entitled MULTI-PROCESSOR SYSTEM {AttorneyDocket Number: NEXSI-01020US0} and are divided into specific tasks whereseven total processors are used and run independent copies of NetBSD: 3are dedicated for the OSPF processes; 3 are dedicated for IKE/PKIprocesses; 1 is dedicated for the management processes; and one is aspare.

As the name implies, the Control Authority manages the system.Specifically, it handles such items as: system bring up; faulttolerance/hot swaps; management functions; SNMP; logging functions;command line interface parsing: interacting with the Network ManagementSystem such as that disclosed in co-pending U.S. patent application Ser.No. 09/900,482, filed Jul. 6, 2001 by Elango Gannesan, Taqi Hasan, AllenB. Rochkind and Sagar Golla, entitled NETWORK MANAGEMENT SYSTEM{Attorney Docket No.: NEXSI-01025US0} and U.S. patent application Ser.No. ______, filed Jul. 5, 2002 by Taqi Hasan and Elango Gannesan,entitled INTEGRATED RULE NETWORK MANAGEMENT SYSTEM {Attorney Docket No.:NEXSI-01252US0}, which applications are hereby fully incorporated byreference into the instant application; layer 2 and layer 3 routingfunctions; ICMP generation and handling; OSPF processes; and IKE/PKIprocesses. As noted above, the Control Authority supports IKE/PKI, OSPFrouting, fault tolerance and management processes on one or more NETBSDcompute elements or CPUs.

Traffic to and from the Control Authority may take several forms: localport traffic to the Control Authority, traffic from the ControlAuthority to the local port, aggregator-to-aggregator traffic, orcontrol traffic passing through the crossbar switch. Local to ControlAuthority traffic may comprise out-of-band management traffic which isassumed to be secure. This is the same for Control Authority trafficmoving to the local port. Control traffic from inside the device maytake several forms, including event logs and SNMP updates, system statusand system control message, in-band management traffic, IKE/PKI trafficand OSPF traffic.

At boot, each compute element may perform a series of tasks includinginitialization of memory, load translation look aside buffer (TLB), amicro-code load, a basic crossbar switch configuration, a load of theNetBSD system on the Control Authority processor and finally a load ofthe packet processing code to each of the compute elements. The ControlAuthority processor NetBSD implementation may boot from a non-volatilememory source, such as a flash memory associated with the particularcompute element designated as the Control Authority, or may boot viaTFTP from a network source. The Control Authority can then controlloading of the software configuration to each compute element by, in oneembodiment, loading an image of the software specified for that elementfrom the flash memory or by network (TFTP) load. In each of the imageloads, one or more of the elements shown in FIG. 5 may be installed inthe compute element. Each compute element will use the operating system305, but subsets of higher layers (320, 330, 360) or all of saidmodules, may be used on the compute elements.

The operating system 305 is the foundation layer of system servicesprovided in the above layers. The operating system 305 provideslow-level support routines that higher layers rely on, such as sharedmemory support 310, semaphore support 312 and timer support 314. Thesesupport routines are illustrated in FIG. 5. In addition, a CPU IDmanager 316 is provided to allow for individual CPU identification.

The operating components shown in FIG. 5 are run on each of the serviceprocessing compute elements, which are those compute elements other thanthe one or more compute elements which comprise the Control Authority.In certain implementations, compute elements have a shared memoryresource for CPUs in the compute element. For the shared memoryfunction, one CPU needs to initialize the memory in all systems beforeall processors can start reading a shared memory region. In general, theinitialization sequence is required by one of the processors with accessto the shared memory region, but the initialization processor is not ina control relationship with respect to any other processor. Theinitialization processor maps the shared memory to agreed-upon datastructures and data sizes. The data structures and semaphore locks areinitialized and a completion signal is sent to the processors.

In general, each CPU can issue a series of shared memory allocationcalls for an area of the shared memory region mapped to application datastructures. After the call, the application accesses the data structuresthrough application-specific pointers. The sequence of calls to theshared memory allocation is the same in all processors and for allprocesses, since the processors are all allocating from the sameglobally shared memory pool. Each processor other than the masterprocessor must perform a slave initialization process where itinitializes the data sizes and structures of the master and waits forthe completion signal from the master CPU.

The semaphore library 312 implements Portable Operating System Interface(POSIX) semantics. A semaphore library is provided and a memory basedsemaphore type is also provided to enable data locking in the sharedmemory. Wait and post calls are provided for waiting for lock to befree, and releasing the lock on a particular memory location. Theinitialization will generally set the memory location to a free state(1). The wait loop will loop until the lock is free and set the lockvalue to locked (0) to acquire the lock. The post call releases the lockfor the next available call. Additional POSIX interfaces are alsoimplemented to provide a uniform interface for dealing with each of thecompute elements.

The timer support module 314 implements two abstract data types: a timerhandler, which is a callback function for timer expiration and takes asingle void parameter with no return value; and a timestamp function,which is an object used short time information. The functions exportedby the timer module are: timer_add, which allows the controller to add atimer callback given a time, handler, and generic parameters; atimer_timestamp which returns the current timestamp; a timer_timeoutwhich checks for timeouts given the timestamp and timeout value; and thetimer_tostring which is a debug return printable string for thetimestamp.

The CPU identification module 316 provides for unique CPUidentification. There are three exported functions including aninitialization module, an obtained ID module, and a get ID module. Theobtain IDE module allows a system chance to obtain the unique CPU youIDE in a Linux-like manner. The CPU ID function allows the return of theCPU ID for the CPU.

Returning to FIG. 5, the next level of the software architecture of thepresent invention implements an IP stack 320. The IP stack 320 providesfunctionality is that are normally found in the networking portion ofthe operating system area. In addition, it provides various TCP/IPservices. The stack of the present invention is optimized forperformance. An important feature of the IP stack of the presentinvention is that it is distributed. Multiple processors with a sharedmemory share the processing of IP packets in the stack.

In the IP stack, the Ethernet driver 322 is responsible for interfacingwith the hardware functions such as receiving packets, sending packets,and other Ethernet functions such as auto negotiation. Is alsoresponsible for handling buffer management as needed by the hardware.

The buffer management module 324 acts as interface between Ethernetdriver and the balance of the system. The buffer manager performs andhandles how buffers are dispatched and collected.

The IP fragmentation module 326 is responsible for identifying afragmented IP packets and collecting them into a linked list of frames.A routing table management module 325 is responsible for maintainingforwarding tables used by IP forwarding and routing. It is responsiblefor interacting with the routing module on the Control Authority computeelement. A TCP packet sequencer 328 is provided to collect and send outpackets in an original ordering and is utilized when a subscriberrequires packets to be read in order. This sequencer is used as anoptional processing step that can be disabled and suffer no performanceloss.

Other modules, which are provided in the IP stack, include timeoutsupport, ARP support, echo relay support, a MAC driver and debugsupport.

Returning again to FIG. 5, the next level in the architecture is theservice architecture 330. The service architecture 330 provides supportfor the flow control and conversation based identification of packetsdescribed below. The service architecture 330 is a flow-basedarchitecture that is suitable for implementing content services such asfirewall, NAT bandwidth management, and IP forwarding.

The service architecture is a distributed system, using multiplemicroprocessors with shared memory for inter-processor communicationsand synchronization. The system uses the concept of a “flow” to define aseries of packets, with multiple flows defining a “conversation.”

A flow is defined as all packets having a common: source address, sourceport, destination address, destination port, subscriber ID, andprotocol. As packets travel through the content service aggregator, eachpacket is identified as belonging to a flow. (As discussed below, thisis the task of the Control Authority and input/output compute elements.)The flows are entered into flow tables which are distributed to each ofthe compute elements so that further packets in the same flow of can beidentified and suitable action on the packet applied in rapid fashion.It should be noted that the subscriberID is not necessarily used withinthe processing pipes. If the traffic is local to remote traffic, a VLANtag is used along with the subscriber ID. If the traffic is remote tolocal, a forwarding table lookup is performed.

The use of the flow tables allows for packet processing to be rapidlydirected to appropriate processors performing application specificprocessing. Nevertheless, initially, the route of the packets throughthe processing pipelines must be determined. As shown in FIG. 6 a,packets and flows can follow a “slow” or “fast” path through theprocessors. The identification process defines a “slow path” for thepacket, wherein the processing sequence for the flow must be set up aswell as the specific requirements for each process. This includesperforming a policy review based on the particular subscriber to whomthe flow belongs, and setting up the flow to access the particularservice or series of services defined for that subscriber. A “fast path”is established once the flow is identified and additional packets in theflow are routed to the service processors immediately uponidentification for processing by the compute elements.

This slow path versus a fast path distinction is found in many of theapplied services. For example, in the case of routing, the first packetof a flow may incur additional processing in order to allow the systemto look up the appropriate next hop and output interface information.Subsequent packets in the flow are quickly identified and forwarded tosee next hop and output interface non-performing routing informationlook-ups again. Similar “slow” and “fast” path models are applied in theprovision of other services.

Flows are organized into a conversation model. In a conversation, twoparties are supported: an initiator and a respondent. Each conversationis a model of a user session, with a half-conversation corresponding toan initiator or a responder. Each half conversation has a controlchannel and data channel, so that there are four total flows in, forexample, an FTP session, a for an responder door control channel's andan initiate for and responder gator channels.

Returning to FIG. 6 a, the slow path/fast path distinction in thepresent system is illustrated. When the first packet of a newconversation enters the system via the input queue 600, the flow lookup602 will fail and a slow path process is taken where new conversationprocessing 612 is performed. The new conversation processing involvesrule matching 612 based on a policy configuration 610 on the applicablepolicy. If a particular conversation is allowed, then a conversationobject is created and state memory is allocated for the conversation.The flow objects are created and entered into the flow table 616. If therule match determines that the conversation is not part of a flow whichcan be processed by the service compute elements, the packets requirefurther processing which is performed on one of the processors of theControl Authority 618, such as IKE. This processing is implemented byconsulting with the policy configuration 610 for the subscriber owningthe packet. An exemplary set of flow tables is represented in FIG. 6 b.In FIG. 6 b, two tables are shown: rhasttbl and lhastbl. rahstblincludes remote object flow identification information, such as theremote address, remote port, protocol, subscriber and VPNidentification. The local hash table contains internal flow data andsubscriber specific information, such as the local address, local port,protocol, flag, subscriber VPN identification, and a handle (whose usageis described below).

When additional packets in the flow arrive, the flow table lookup willsucceed and the fast path will be taken directly to the service actionprocessor or processing pipeline, allowing the service to be appliedwith much greater speed. In some cases, a conversation manager isconsulted. Following application that a particular service, the packetexits at the system via an output queue.

Returning again to the service architecture of FIG. 5, an additionalmodule shown in the service architecture is the conversation handler322. The conversation handler 332 is responsible for creating,maintaining, operating, and destroying conversation and halfconversation objects.

The flow module 334 is responsible for flow objects which are added anddeleted from the flow table.

The rules policy management module 336 allows policies for a particularsubscriber to be implemented on particular flows and has two interfaces:one for policy configuration and one for conversation creation. Thepolicy configuration module 336 matches network policy rules for aparticular subscriber to application processing in the content serviceslevel of the architecture. The conversation creation module consults thepolicy database and performs rule matching on newly arrived packets. Inessence, when a packet arrives, if it takes the slow path, the packetmust the clear aid to determine which subscriber to packet belongs toany policies in place for that subscriber in order to ford the packetthrough the correct processing pipeline for that particular subscriber.

The service state memory manager 336 allows any service in the servicearchitecture to attach an arbitrary service-specific state, were datafor the state is managed by the state module. Thus, the allocated stateobjects can be attached on a per flow basis, per half conversationbasis, or per conversation basis. States that are outside theconversation such as, for example, RPC port mappings, are dealt withseparately.

The application data parser 340 provides a common application dataparsing routine. One example is a Telnet protocol.

Finally, a TCP data reconstruction module 344 ensures that data seenthat by the IP content services are exactly the same data seen by finaldestination servers. An anti-replay defense may be implemented usingthis module as well.

At the top of the architecture stack shown in FIG. 5 are the IP contentservices modules 360.

In the version of NetBSD running on the Control Authority, the Ethernetdriver has been changed to match a simple Mac interface, where it getsand puts packets from a pre-assigned block of memory. Hence IP addressesare assigned to these NetBSD CPUs and the programs are run as if theyare multiple machines. Inter NetBSD CPU communication is done by usingloopback addresses 127.0.0.*. IKE/PKI and the management CPU has thereal IP addresses bound to their interfaces.

The MAC layer is aware of the IP addresses owned by the NetBSD CPUS andshuttles packets back and forth.

Each management CPU runs its components as pthreads (Single UnixSpecification Threads). In the embodiment shown in FIG. 4, the CPUscommunicate with the compute element CPUs through UDP sockets; this isdone so that the processes/threads on the NetBSD CPUs can block and notwaste CPU cycles.

The security of subscriber traffic is maintained by using VLAN tagging.Each subscriber is assigned a unique VLAN tag and the traffic from thesubscribers is separated out using this VLAN tag. In one embodiment, thecontent services aggregation device is assumed to be in place betweenthe physical WAN switch and a layer 2 switch coupled between the deviceand the data center. The VLAN table reflects tags at the downstreamLayer 2 switch and is configured at the aggregator by the operator.

Operation of the Control Authority on the different types of traffic isillustrated in FIG. 8.

As a new packet enters the Control Authority 100 a, at step 810, theControl Authority determines type of traffic it is and routes it to oneof a number of function handlers accordingly. If the traffic is SNMPtraffic, an affirmative result is seen at step 812 and the traffic isforwarded to an SNMP handler at 814. If the management traffic CommandLine Interface traffic at step 816, the traffic is forwarded to a CLIhandler at 818.

If the traffic is from the Network Management System server at step 815,the traffic is forwarded to a Log Server handler at 817. If the trafficis change of state traffic from outside of the content servicesaggregator at step 820, it is routed to a failover handler 822.Likewise, if the aggregator is sending change state traffic inside ofthe aggregator, at step 824 the result is affirmative, and it isforwarded to the failover mode initialization handler at 826. In thissense, failover refers to a service applicable when multiple contentservices aggregators are coupled together to allow performanceredundancy. They may be configured as master-slave or peer-to-peer andupon failure of one of the devices, the failover handler will coordinateone device taking over for another.

At step 828, a determination is made as to whether the traffic isIKE/PKI traffic and if so, the traffic is forwarded to the IKE/PKImodule, discussed in further detail below. If the traffic comprisesrouting instructions, as determined at step 836, the traffic is handledby the router module at 834. If the traffic is control traffic, at step836, the particular control settings are applied 838. If the traffic isa layer 2 packet, it is handled by a layer 2 handler at 842. And if thepacket is an ICMP packet, it is handled by an ICMP handler at 846.Finally, if the packet is a trace route packet 848, it is forwarded to atracert (trace route) handler at 849. If it cannot be determined whattype of packet type is present, an error is generated and the packetdropped. It should be understood that the ordering of the steps listedin FIG. 8 is not indicative of the order in which the determination ofthe packets is made, or that other types of functional determinations onthe packet are not made as packets enter the Control Authority.

C. Processing Pipelines

As noted above, the system supports a plurality of application servicemodules. Those shown in FIG. 5 include Firewall, NAT, IP forwarding(OSPF, static and RIP Routing), Bandwidth Management, SSLEncryption/Decryption, Web Switching, Web Caching and IPSEC VPN.

In an implementation of the architecture of the present inventionwherein the compute elements and cross-bar switch are respectivelymulti-processor unit 2010 and cross-bar switch 3010 or 3110 describedbelow, IP packets with additional data attached to them may be sentwithin the system. This ability is used in creating a pipeline ofcompute elements, shown in FIGS. 7 a and 7 b.

In one embodiment, the processing pipelines are dynamic. That is, anycompute element can transfer a processed packet to any other computeelement via the crossbar switch. In a fully dynamic embodiment, eachcompute element which is not part of the control authority can performany of the services provided by the system and has a full software load(as described briefly above). In an alternative embodiment, the processpipelines are static, and the flow follows an ordering of the computeelements arranged in a pipeline as shown in FIG. 7 a in order toefficiently process the services. In this static pipeline, functionalapplication service modules are assigned to specific compute elements,and specific processors within the compute elements may be optimized forcomputations associated with providing a particular service. As such,the software load for each compute element is controlled by the ControlAuthority at boot as described above. Nevertheless, the pipelines shownin FIG. 7 a are only one form of processing pipeline and the hardwarerepresentation therein is not intended to be exclusive or limiting onthe scope of the present invention. It should be recognized that thisordering is exemplary and any number of variations of static pipelinesare configurable. As illustrated in FIG. 4, the processing pipelineshown in FIG. 7 a and the flow pipeline shown in FIG. 7 b may beprovided on physical cards which may be used as part of a larger system.

As noted briefly above, once a new packet flow enters the input queueand is fed to an input compute element 100 b, 100 c, a policy matchingprocess performs a rule-matching walk on a per subscriber basis todetermine which services are to be applied to the flow. In oneembodiment, the flow is then provided to a processor pipeline withspecific compute elements designated as performing individual contentservices applications in cooperation with the Control Authority.

FIGS. 7 a and 7 b illustrate generally the mapping of the particularapplication module to particular process element, thereby forming aprocess pipeline. As shown in FIG. 7 b, two compute elements 100 b and100 c perform flow stage operations allowing the system to classify flowand conversation packets. Processor 100 a represents the ControlAuthority NetBSD compute engine. FIG. 7 a shows the application modulesoperating on individual processors. In one embodiment, each computeelement may be optimized for implementing one of the content servicesapplications. In an alternative embodiment, a dynamic pipeline may becreated wherein the compute elements can perform one or more differentnetwork services applications, and each element used as needed toperform the individual services. In FIG. 7 a, processor 100 d isoptimized to cooperate with the Control Authority to perform IPSecutilizing the IPSec module. This includes performing securityassociation database (SADB) lookups, IPSec encapsulation, bandwidthmanagement, QoS, and forwarding. Compute element 100 h is optimized forFirewall and NAT processing as well as QoS and Webswitching. Likewise,processors 100 f, 100 g and 100 e are utilized for Web switching, Webcaching, and SSL optimized computations. In some cases, elements 100 dand 100 h are referred to herein as “edge” compute elements, as theyhandle operations which occur at the logical beginning and end of theprocessing pipeline.

Each of the application services modules cooperates with the ControlAuthority 380 in the provision of application services. For each serviceapplication, this cooperation is different. For example, in IPSecprocessing, Security Policy Database (SPD) information is stored in theflow stage, wile IKE and PKI information is kept in the ControlAuthority, and statistics on IPSec and the security association databaseis maintained in the IPSec stage. In providing the firewall service, IPlevel check info is maintained in the flow stage, level 4-7 check infois maintained in the firewall module, and time based expiration ismaintained in the Control Authority.

In this embodiment, for example, in order to contain the IPSec sequencenumber related calculations to the shared memory based communication, asingle IPSec security association will be mapped to a single OperatingSystem 305 compute element. In addition, in order to restrict thecommunications needed between the various flows of a “conversation”, aconversation will be mapped to a single processing element. In essence,this means that a given IPSec communication will be handled by a singleprocessing pipe.

D. Flow Stage Module

FIG. 7 b illustrates the flow stage module as operating on two computeelements 100 b and 100 c. FIG. 9 illustrates the process flow within theflow stage. The flow stage module is responsible for identifying newflows, identifying the set of services that needs to be offered to theflow and dynamically load balancing the flow (to balance throughput,memory usage and compute usage) to a pipeline of compute elements. Indoing so, the flow stage also honors the requirements laid out by theabove items. Flow stage also stores this information in a flow hashtable, for subsequent packets in a flow to use.

As new flows are identified, if a new flow requires other support datastructures in the allocated compute elements, appropriate functions arecalled to set up the data structures needed by the compute elements. Anexample of a data structure for the IPSec security authority process isdescribed below with respect to FIGS. 13-14.

In general, and as described in particular with respect to FIG. 9, forevery packet in a flow, the flow hash table is read, a “route-tag” thathelps to route a packet via the required compute elements internally tothe content service aggregator is added, and the packet is forwarded onfor processing.

Certain conventions in the routing are maintained. In general, new flowsare routed to processing pipelines such that the traffic through thecontent service aggregator is uniformly distributed across the availableprocessing pipelines. Flows are distributed to processing pipelines suchthat the flows belonging to the same security association are sent tothe same processing pipeline. New flows are allocated such that a“conversation” (flows, reverse flows and related flows) is sent to thesame processing pipeline. In addition, the flow stage checks the SPDpolicies on new flows and trigger IKE if an IKE-SA/IPSec-SA is notalready established.

To bind conversations and a given IPSec security association to singlecompute elements, the flow stage employs various techniques. In onecase, the stage can statically allocate subscribers to processingpipelines based on minimum and maximum bandwidth demands. (For example,all flows must satisfy some processing pipeline minimum and minimizevariation on the sum of maximums across various processing pipelines).In an alternative mode, if a subscriber is restricted to a processingpipeline, new flows are allocated to the single pipe where thesubscriber is mapped. Also, the route-tag is computed in the flow stagebased on policies. The processing can later modify the route-tag, ifneeded.

The flow routing process is illustrated in FIG. 9. As each packet entersthe system at step 902, the system determines the type of the packet itis and routes it accordingly. At step 904, if the packet is determinedto be a data packet from inside the content services aggregator, thesystem understands that the packet is intended to flow through thesystem at step 906, and the compute elements 100 b, 100 c are set to aflowthrough mode. If the packet is not from inside the aggregator at904, then at step 908 if the system determines that the packet is localtraffic from outside of the content services aggregator, the flow tableis checked at step 910 and if a match is found at step 912, thedestination is retrieved at step 914. If the security associationdatabase contains information on the flow at step 916, then at step 918,the packet is forwarded to its destination via the crossbar switch withits security association database index, route tag and crossbar headerattached. If the security association database information is notpresent at step 916, and the packet is forwarded to its destination withonly its route tag and the crossbar header at 920.

If no match is found at the checking the hash flow table at step 912,then a policy walk is performed wherein the identity of the subscriberand the services to be offered are matched at step 944. If a subscriberis not allocated to multiple pipes, at step 946, each pipe is “queried”at step 950 (using the multi-cast support in the cross-bar switch) todetermine which pipe has ownership of the conversation. If one of thepipelines does own the conversation, the pipeline that owns thisconversation returns the ownership info at 950 and service specificset-up is initiated at 948. The service specific setup is also initiatedif the flow is found to be submapped as determined by step 946. If nopipe owns the flow at step 950, that the flow is scheduled for a pipe at952. Following service specific setup at 948, a database entry to thefast path processing is added at 953 and at step 954, route tag is addedand the packet forwarded.

If the packet is not local at 908, it may be remote traffic from outsideof the content services aggregator as determined at step 930, the flowtable is checked at step 932 and if a match is found, at step 934, it isforwarded to its destination at step 936. If it is remote traffic fromoutside the box and a match is not found at step 934, the packet ismapped to its destination at step 938 and an entry is created in theflow table before forwarding the packet to its destination.

If the packet is a control packet from within the content servicesaggregator at step 940, the packet is one of several types of controlpackets and may be included those shown in process 956. These types ofcontrol packets may include a flow destroy packet, indicating that aparticular flow is to be destroyed. A flow create packet indicating thatthe particular flow is to be created in the flow table. Other types ofcontrol packets include a flow validate packet, database update packets,debug support packets, or load measuring packets.

E. QOS (Quality of Service)

QOS is performed by both the IPSec Modules and the Firewall Modules atthe flow stage.

In the system of the present invention, bandwidth allocation isperformed on a per-subscriber basis. In general, the goal of QOS is toprovide bandwidth allocation on a per-system rather than per-interfacebasis. The minimum guaranteed and maximum allowed bandwidth usage isconfigurable on a per-subscriber basis. The QOS architecture providesthat where an internal contention for a resource makes it impossible tomeet the minimum bandwidth requirements for all subscribers, performanceshould degrade in a manner that is “fair” to all subscribers, and wherethe system is under-utilized, the extra available bandwidth should beallocated in a manner that is “fair” to all subscribers with activetraffic.

The traditional approach to QOS uses an architecture known as Classify,Queue, and Schedule (CQS). When a packet arrives in the system, it isfirst classified to determine to which traffic class it belongs. Oncethis classification has been made, the packet is placed in a queue alongwith other packets of the same class. Finally, the scheduler choosespackets for transmission from the queues in such a way that the relativebandwidth allocation among the queues is maintained. If packets for agiven class arrive faster than they can be drained from the queue (i.e.the class is consuming more bandwidth than has been allocated for it)the queue depth will increase and the senders of that traffic class mustbe informed to lower their transmission rates before the queuecompletely overflows. Thus, in the CQS architecture, bandwidth controlis shared between two loosely-coupled algorithms: the schedulingalgorithm maintains the proper division of outgoing bandwidth among thetraffic classes and the selective-drop algorithm (a.k.a. the admissioncontrol algorithm) controls the incoming bandwidths of the trafficclasses.

This traditional architecture does not function well in themultiprocessor system of the present invention. In order to implement afair scheduling algorithm one would have to monitor (n·s·c) queues,where n is the number of processors, s is the number of subscribers andc is the number of classifications per subscriber. Further, each computeCPU's queues cannot be dealt with in isolation since theper-class-per-subscriber bandwidth guarantees are for the entire computeelement, not for the individual CPUs.

The QOS architecture of the present invention determines a set ofdistributed target bandwidths for each traffic class. This allows thecontent aggregator to provide bandwidth guarantees for the system as awhole. These targets are then used on a local basis by each flow computeelement to enforce global QOS requirements over a period of time. Afterthat period has elapsed, a new set of target bandwidths are calculatedin order to accommodate the changes in traffic behavior that haveoccurred while the previous set of targets were in place. For eachtraffic class, a single target bandwidth must be chosen that: providesthat class with its minimum guaranteed bandwidth (or a “fair” portion,in the case of contention for internal resources); does not allow thatclass to exceed its maximum allowed bandwidth; and awards a “fair”portion of any extra available bandwidth to that class.

For purposes of the following disclosure, the term “time quantum” (or“quantum”) refers to the amount of time that elapses between eachsynchronization of the admission control state; the term Min_(i) refersto the minimum bandwidth guaranteed to subscriber i; the term Max_(i)refers to the maximum bandwidth allowed to subscriber i; the term B_(i)refers to the total bandwidth used by subscriber i during the mostrecently completed time quantum; the term Avg_(i) refers to the runningaverage of the bandwidth used by subscriber i over multiple time quanta;and the term Total_(i,j) refers to the total bandwidth sent from flowCompute element i to P-Blade edge Compute element j during the mostrecently completed time quantum.

Two additional assumptions are made: the change in Avg_(i) between twoconsecutive time quanta is small compared to Min_(i) and Max_(i); andthe time required to send a control message from a processing pipelineedge compute element to all flow compute elements is very small comparedto the round trip time of packets that are being handled by the systemas a whole.

Identifying and correcting is the top priority to determine the set oftarget bandwidths for the next quantum, multiple congestion areas inwhich a resource may become over-subscribed and unable to deal with allof its assigned traffic are identified.

There are three potential points of resource contention in the system ofthe present invention: the outbound ports from the flow stage processingpipeline crossbar switch to the service provision processing pipelinecompute elements; the inbound port to the service processing pipelinecrossbar switch from the edge compute elements (or the computationalresources of the edge compute elements themselves); and the outboundports from the flow stage crossbar switch to the outgoing systeminterfaces. The first two areas of contention (hereafter known asinbound contention) are managed by the flow compute elements 100 b, 100c while outbound interface contention is resolved by the serviceprocessing pipeline edge compute elements 100 d, 100 h. The followingdescription follows the general case of inbound contention. It will beunderstood by one of average skill that the methods used there can beeasily applied to outbound contention.

After the flow compute elements have exchanged statistics for the morerecently completed time quantum, the overall bandwidth from each flowcompute element to each edge compute element, Total_(i,j), is computed.Resource contention exists for edge compute element j if any of thefollowing constraints are not met:

Total_(1, j) + Total_(2, j) ≤ 1  Gbit/sec Total_(1, j) + Total_(2, j) ≤ 1  Gbit/sec ${\sum\limits_{i = 1}^{4}{Total}_{i,j}} \leq {1\mspace{14mu} {Gbit}\text{/}\sec}$

Note that this method of contention detection is strictly for thepurposes of identifying and correcting contention after it has occurredduring a time quantum. Another method is required for detecting andreacting to instantaneous resource contention as it occurs and isdescribed below.

As noted above, one goal of the QOS architecture is that, in thepresence of resource contention, the minimum guaranteed bandwidths foreach subscriber contending for the resource should be reduced in amanner that is fair to all contending subscribers. More specifically,the allocation of the available bandwidth for a contended resource willbe considered fair if the ratio of Avg_(i) to Min_(i) is roughly thesame for each subscriber contending for that resource:

$\left. {Fair}\Leftrightarrow{\forall i} \right.,{j \in {{\left\{ {Contenders} \right\} \text{:}\mspace{14mu} \frac{{Avg}_{i}}{{Min}_{i}}} \approx \frac{{Avg}_{j}}{{Min}_{j}}}}$

Once contention for a resource has been detected, the contenders'bandwidth usage for the next quantum is scaled back to alleviate thecontention and maintain a fair allocation of bandwidth among thecontenders. In the case of a single contended resource with a bandwidthdeficit of D, a fair allocation is obtained by determining a penaltyfactor, P_(i), for each subscriber that is then used to determine howmuch of D is reclaimed from that subscriber's bandwidth allocation.P_(i) can be calculated by solving the system of linear equations:

$\frac{{Avg}_{1} - {P_{1}D}}{{Min}_{1}} = {\ldots = \frac{B_{n} - {P_{n}D}}{{Min}_{n}}}$${\sum\limits_{i = 1}^{n}P_{i}} = 1$

The above equations yield ideal values for the set of penalty factors inthe case of a single contended resource. In the case of m contendedresources, a nearly ideal set of penalty factors can be found by solvingthe system of linear equations:

$\frac{{Avg}_{1} - {P_{1,1}D_{1}} - \ldots - {P_{1,m}D_{m}}}{{Min}_{1}} = {\ldots = \frac{{Avg}_{n} - {P_{n,1}D_{1}} - \ldots - {P_{n,m}D_{m}}}{{Min}_{n}}}$$\mspace{20mu} {{\sum\limits_{i = 1}^{n}P_{i,1}} = 1}$   ⋮$\mspace{20mu} {{\sum\limits_{i = 1}^{n}P_{i,m}} = 1}$

Solving systems of linear equations is a well-studied problem and thebest algorithms have a time complexity of O(n³) where n is the number ofvariables. Given that n could be well over 1000, in order to make thesystem practical for implementation in the present invention, thefollowing algorithm can be used to find approximate values for thepenalty factors. The intuition behind the algorithm is that the systemsof linear equations shown are being used to minimize, for allcontenders, the quantity:

${abuse}_{i} = {\frac{{Avg}_{i} - {P_{i}D} - \ldots - {P_{1,m}D_{m}}}{{Min}_{i}} - \frac{\sum\limits_{j = 1}^{n}\frac{{Avg}_{j} - {P_{j}D} - \ldots - {P_{1,m}D_{m}}}{{Min}_{j}}}{n}}$

The algorithm divides D into s smaller units and penalizes by D/s thesubscriber with the highest calculated abuse value during each of siterations. Since it takes O(n) operations to determine the subscriberto penalize for each iteration, the time complexity of this algorithm isO(sn), or simply O(n) if s is fixed. In practice, abuse will notactually be calculated; identifying the subscriber with the highestratio of penalized average bandwidth to minimum bandwidth is equivalent.

Unfortunately, not all traffic-shaping decisions may be postponed untilthe next time quantum. In the case of resource contention, it ispossible for the packet buffers in the flow and edge compute elements tooverflow from the cache in a time period that is much smaller than afull time quantum. In the case of inbound contention, there can be up to1 Gbit/sec of excess data being sent to a contended resource. Assumingthe worst case of 64 byte packets and that 300 packets will fit in ancompute element's cache (remember that all packets require a minimum ofone 512-byte block), an overflow condition may occur in as quickly as:

$\frac{300\mspace{14mu} {{packets} \cdot 64}\mspace{14mu} {bytes}\text{/}{{packet} \cdot 8}\mspace{14mu} {bits}\text{/}{byte}}{1\mspace{14mu} {Gbit}\text{/}\sec} \approx {150\mspace{14mu} µ\; \sec}$

This amount of time is about 40 times smaller than the proposed timequantum so it will be necessary to detect and handle this situationbefore the current time quantum has expired.

The choice of time quantum has a direct impact on the performance of theQOS architecture. If the value is too small, the system will beoverloaded by the overhead of exchanging state information and computingnew target bandwidths; if the value is too large, the architecture willnot be able to react quickly to changing traffic patterns.

As a starting point, the largest possible quantum that will stillprevent a traffic class with the minimum possible bandwidth allocationfrom using more than its bandwidth quota during a single quantum isused. Assuming that the 5 Mbits/sec as the minimum possible bandwidthfor a class and that this minimum is to be averaged over a time periodof 10 seconds, the choice of time quantum, q, is:

$q = {\frac{5\mspace{14mu} {Mbits}\text{/}{\sec \cdot 10}\mspace{14mu} \sec}{8\mspace{14mu} {Gbits}\text{/}\sec} = {6.25\mspace{14mu} m\; \sec}}$

This parameter may be empirically tuned to find the ideal balancebetween responsiveness to changing traffic patterns and use of systemresources.

Since maintaining a true moving average of the bandwidth used on aper-subscriber basis requires a good deal of storage space for sampledata, the Exponential Weighted Moving Average (EWMA) is used.

The EWMA is calculated from a difference equation that requires only thebandwidth usage from the most recent quantum, v(t), and the previousaverage:

Avg_(i)(t)=(1−w)Avg_(i)(t−1)+wv(t)

where w is the scaling weight. The choice of w determines how sensitivethe average is to traffic bursts.

In general, in implementing the aforementioned QOS architecture, thesystem includes a flow stage QOS module, an IPSec stage outbound QOSmodule, an IPSec stage inbound QOS module, a firewall stage outbound QOSmodule, and a firewall stage inbound QOS module.

The flow stage QOS module is responsible for keeping statistics on thebandwidth consumed by subscribers that it sees. Time is divided intoquantum and at the end of each quantum (indicated through a controlmessage from the Control Authority), statistics are shared with theother flow stages, including the split of the bandwidth by serviceprocessing pipelines. This enables each flow stage to have an exact viewof the bandwidth consumed by different customers/priorities. Bandwidthmaximum limits and contention avoidance are enforced by calculating dropprobability and applying it on packets that pass therethrough.

In implementation, the flow stage QOS module will use a number ofvariables (where each variable has the form “variable [id1] [id2] . . .[id(n)]” and such variables may include: bytes_sent[cpu] [subscriber][color] [p-ipe], number_of flows[subscriber] [color] [p-pipe],drop_probability[subscriber] [color][p-pipe], and bytes_dropped[cpu][subscriber] [color] [p-pipe] where the id “color” refers to the packetpriority.

When time quantum messages are received from the Control Authority, theCPU will sum up the statistics and send to the CA and other CPUs togenerate (bytes_seen[subscriber][color][p-pipe]). The CLI cpu will alsosend messages to the compute-CPUs to reset their counters. The flowstage module will also calculate the bandwidth usage in the last quantumand determine whether any maximums are exceeded. If so, it willcalculate the drop probability in shared memory. Compute CPUs use it assoon as it is available. Next, the flow stage will calculate cumulativebytes_sent[p-pipe], if a processing pipeline is over subscribed, it willcalculate drop probability drop_probability[subscriber] [color] [p-pipe]in shared memory. Compute elements in the service pipeline use this assoon as it is available. The variable bytes_sent[p-pipe] is used inassigning new flows to processing pipelines. If the processing pipelineor the cross-bar switch sends a “back-off” message, the flow stage QOSwill compute a new drop probability:drop_probability[subscriber][color][p-pipe] using a rule of thumb thatthe TCP window will reduce the rate by 50% if a packet is dropped. Ifthere are many simultaneous flows, the drop probability is higher andsmaller if we have small number of flows currently active. The flowstage QOS will also send alerts when maximum is exceeded, when min isnot satisfied due to internal contention, when packets are dropped dueto contention. Finally, this stage will keep track of packets droppedand log it to control authority.

The QOS module present on the IPSec compute element of the processorstage inbound and firewall stage inbound QOS module send panic messagesback to the Control Authority on overload. A watermark is implemented toensure that a burst can be handled even after a panic message was sent.

The IPSec stage inbound QOS module and firewall stage inbound QOS moduleimplementations keep track of the queue sizes in the compute CPUs. If a80% watermark is exceeded send a panic signal to the flow stages. Inthis stage, there is no need to drop packets.

The IPSec stage outbound QOS module and firewall stage outbound QOSmodule detect contention on an output interface. The packets that cometo this stage (in outbound direction) would be pre-colored with thepriority and subscriber by the flow stages. This stage needs to send thepackets to the correct queue based on the color. Due to the handling ofQOS at the input a backoff really indicates contention for an outputport, due to bad luck.

In implementation, the flow stage outbond QOS module will use a numberof variables (where each variable has the form “variable [id1] [id2] . .. [id(n)]” and such variables may includebytes_sent[cpu][subscriber][color][interface]. Upon receipt of timequantum messages from the control authority CLI CPU will sum up thestatistics and send to the CA and other CPUs: bytes_sent[cpu][subscriber] [color] [interface]. The CLI cpu will also send messages tothe compute-CPUs to reset their counters. The flow stage outbound QOSwill then calculate cumulative bytes_sent[interface], if an interface isover subscribed, calculate drop probability:drop_probability[subscriber][color][interface] in shared memory. Thisinformation will then be provided to the processing pipeline computeelements to use as soon as it is available. In alternative embodiments,the “use bytes_sent[interface]” value can be used in assigning new flowsto interfaces on equal cost paths. Upon receiving a back-off messagefrom a p-pipe, compute new drop probability:drop_probability[subscriber][color][p-pipe] using a rule of thumbwhereby the TCP window will reduce the rate by 50% if a packet isdropped. If there are many simultaneous flows, the drop probability ishigher and smaller if we have small number of flows currently active.The flow stage QOS will also send alerts when packets are dropped due tocontention. Finally, this stage will keep track of packets dropped andlog it to control authority.

F. IPSec Stage Module

The IPSec stage module is responsible for encapsulating local to remoteIPSec traffic and de-capsulating remote-to-local IPSec traffic. Forremote-to-local traffic, if needed, the module de-fragments theencapsulated IPSec packets before de-capsulation. For local-to-remotetraffic, if needed, the module fragments a packet after encapsulated (ifthe packet size exceeds the MTU). Before sending the packet to theFirewall stage compute element, the module tags the packet with thesubscriber ID and a VPN IKE tunnel ID. Each subscriber is entitled toimplement firewall rules specific to that subscriber. Once an IKEsession is established, the security associations are sent to this stageby the Control Authority. This stage is responsible for timing out thesecurity association and starting the re-keying process. Controlinformation and policies are downloaded from the Control Authority. Themodule also supports management information bases, logging andcommunication with other compute elements.

In one implementation, the IPSec module operates as generally shown inFIG. 10. As each new packet enters the IPSec module at 1010, adetermination is made as to whether the packet needs to be encapsulatedat step 1016 or de-capsulated at step 1012. If the packet is anencapsulation case, at step 1014, the system will extract the securityparameter index (SPI) and do an anti replay check. Basic firewall ruleswill be applied based on the tunneling IP. The security association (SA)will be retrieved from the security association database, and the packetde-capsulated using the security association. The internal header willbe cross-checked with the security association. The security associationstatus will be updated and renewal triggered if needed. Bandwidthmanagement rules may be applied before sending the packet on to the nextcompute element processing stage with the crossbar header attached.

If the packet requires encapsulation, at step 1016, the system willfirst determine whether the packet is part of an existing flow bychecking the hash flow table at step 1018. If a match is found, thesystem will use the handle value and at step 1026, using the securityassociation database index, the system will retrieve the securityassociation, encapsulate the packet using the security association,update the security association status and trigger a renewal ifnecessary. IP forwarding information will be saved and the packet willbe forwarded on to the next stage. If a match is not found in the hashtable, an error will be generated at step 1024. If the traffic iscontrol traffic is indicated at step 1030, it may comprise one ofseveral types of control traffic including security association databaseupdate, fault tolerance data, system update data, or debug support alongthe systems running the featured mode, triggering a software consistencychecked, a hard ware self check, or a system reset at 1032.

A more detailed description of the IPSec module is shown and describedwith respect to FIGS. 12-15, and illustrates more specifically how theControl Authority and the compute elements work together to provide theservice in a distributed manner.

FIG. 12 is a block diagram illustrating how the flow stage 710, theIPSec processor stage 720 and the IKE stage 380-1 running in the ControlAuthority cooperate to distribute the IPSec service. As shown in FIG.12, the IKE stage of the Control Authority includes an ISAKMP/Oakley keymanager, an IPSec policy manager, a multiplexor, certificate processingtools, a cryptography library and a utility library. The IO/Flow stage710, described above, performs the SPD lookups and provides the IKEinterface, while the IPSec stage 720 provides a command line interfaceand is the controlling processor for the operation.

Communication between the flow stage and the IPSec stage 720 willinclude SPD entry commands, including creation and deletion of SPDentries, as well as flow entry control. Control messages for IKE andIPSec will pass between the IKE stage 380-1 and the IPSec CPU 720. TheIPSec stage will retrieve all security association information from theIKE stage 380-1. The flow stage 710 will provide the initial lookups andprovide a handle for the packet, as described above with respect to FIG.10. Once the compute engine receives the packet, the type of processingrequired is identified. The possibilities include Encryption and HMACgeneration, decryption and validation and none. Note that various typesof IPSec processing can occur, including Encapsulating Security Protocol(ESP) and Authentication Header (AH) processing.

The data structure for the security association database is illustratedin FIG. 15. As shown therein each security association includes adatabase pointer sadb-ptr to the security association database. Eachdata entry contains selectors as well as inbound and outbound IPSecbundles. Each IPSec bundle contains information about IPSec size andsecurity association control blocks. Each control block containsinformation about security keys, lifetime statistics and the replaywindow.

The particular implementation of IPSec processing on the compute engine(and by reference therein to the control stage 380-1) is shown in FIG.13. As shown in FIG. 13, the compute CPU fetches the next packet fromits input queue. (This operation will vary depending on the nature ofthe hardware running the system of the present invention.)

At step 1310, using the handle provided by the flow stage, the CPU willfind the security association for the packet and preprocess the packet.If the packet is a local to remote packet (a packet destined for theInternet), as determined at step 1312, the CPU at step 1314 will shiftthe link headers, create space for IPSec headers in the packet headers,build an ESP header, set padding and set the next protocol field.

At this stage, the packet is ready for encryption. In a general hardwareimplementation, the encryption algorithm proceeds using the encryptiontechniques specified in the RFCs associated with IPSec and IKE andimplemented using standard programming techniques on a conventionalmicroprocessor. In one particular implementation using themultiprocessing hardware discussed herein, the encryption technique 1350is implemented using a compute element with an accelerator: steps 1316,1318, 1320, 1322, 1326 and 1328 are implemented if the software isoperated on a compute element in accordance with co-pending U.S. patentapplication Ser. No. 09/900,481, filed Jul. 6, 2001 by Fred Gruner,David Hass, Robert Hathaway, Ramesh Penwar, Ricardo Ramirez, and NazarZaidi, entitled MULTI-PROCESSOR SYSTEM {Attorney Docket Number:NEXSI-01020US0} wherein the compute elements include an applicationspecific co-processor wherein certain service specific functions can beaccelerated in hardware, as defined in the co-pending application.

In this implementation the acceleration function is called at step 1316and if the call is successful at 1318, the co-processor performs theencryption function and completes at step 1320. The status flagindicating the co-processor is busy will be set at 1322, a check will bemade at 1326 to determine if the maximum number of packets has beenprefetched and if not packets will be pre-fetched (step 1328) forcontinued processing as long as the minimum number of packets has notbeen reached (at step 1326). If the call for the accelerator functionfails, an error will be logged at 1324.

FIG. 14 shows the completion of the encapsulation function. Once thepacket had been encapsulated, if no errors (at step 1410) have occurredin the encapsulation accelerator, or upon completion of the conventionalencryption process, if the packet is determined to be a local to remotepacket at step 1414, then at step 1416, the cross bar header will beadded, the subscriber identifier will be determined from the securityassociation and saved in the crossbar header. The packet will befragmented as necessary and transmitted to the compute element's outputqueue.

If the packet is not a local to remote packet, then the cross bar headerwill be built and the next stage packet will be determined from theframe header. The next hop Mac address will be filled from the hashtable data structure and the packet forwarded to the next computeelement stage for processing.

It should be noted that each security association can consist ofmultiple flows and all packets belonging to a security association aregenerally directed to one compute element. The security policy databaseis accessible to all compute elements, allowing all compute elements todo lookups in the database.

G. Firewall Stage Module

The firewall stage performs a number of functions. For local to remotenon-IPSec traffic the stage performs stateful Firewall, forwarding andNAT. In addition, for local to remote IPSec traffic, the stage performsbasic egress firewall for tunnel IP and forwarding for tunnelingpackets. For remote to local traffic, the stage performs (de)NAT,Firewall, Forwarding, and bandwidth management.

This stage also receives forwarding table updates and downloads policiesfrom the Control Authority. Support for MIBs, logs and communication toother compute elements are also present in this stage.

FIG. 11 illustrates operation of the Firewall stage. As each packetarrives at step 1110, a determination as to the source and destinationof the traffic is made and if the packet is local to remote traffic, atsteps 1112 and 1114, a second determination is made If the packet islocal to remote traffic the route tag is used to route the packet to thenext available compute element and Firewall, web switching and NAT rulesare applied. The packet is forwarded to other compute elements, ifneeded, for additional service processing, and routed to the crossbarswitch with a route tag at 1116

If the packet is remote to local traffic at step 1120, based on thetunnel ID of the packet, NAT lookups and mappings are applied (deNat),firewall, subscriber bandwidth (QOS) and forwarding rules are appliedand the packet is passed to the next stage in flow through mode.

If the packet is control traffic indicating a policy update, NAT,Firewall, or bandwidth rules are updated, or the forwarding tables areupdated at 1128.

Finally, if the traffic is a control message at 1130, the particularcontrol instruction is run at 1132. If the packet is none of theforegoing, a spurious trap is generated.

H. Routing

In a further aspect of the present invention, the architecture providesa number of routing functions, both internally and for routing betweensubscribers and the Internet (or other public addresses). The systemsupports Open Shorted Path First (OSPF) routing protocol.

FIG. 15 a illustrates a general overview of the routing architecture ofthe content services aggregator of the present invention. As notedabove, physical interface ports of the content services aggregator arelabeled as either trusted or untrusted. The untrusted interfacestypically connect to a core or access router used in the data center.The trusted interfaces are further divided into sub-interfaces by theuse of 801.1Q VLAN tags. These sub-interfaces provide the fanout intoend-customer equipment via layer 2 VLAN switches.

A virtual router handles routing for each subscriber. These virtualrouters send the public addresses present in the subscriber's router tothe provider router. The subscriber router is responsible for finding apath to the subscriber nodes. The provider routers forward the trafficappropriately upstream to the public addresses. The virtual router alsoroutes traffic from the Internet downstream to the appropriatesubscriber. Public addresses in the subscribers are learned at theprovider router by injecting the filtered subscriber routes from thevirtual router to the provider router.

The virtual private routed network (VPRN) setup from the virtualrouter's point of view is done through static routers. IKE tunnels aredefined first and these correspond to unnumbered point-to-pointinterfaces for the router. The sub-nets/hosts reachable via such aninterface is configured as static routes.

Security of subscriber traffic is maintained by using VLAN tagging. Eachsubscriber is assigned a unique VLAN tag. The traffic from thesubscribers is separated out using this VLAN tag. The tagging isactually done at the port of the downstream L2 switch based on ports.The upstream traffic is tagged according to the subscriber it isdestined to and sent downstream to the L2 switch. The VLAN tablereflects tags at the downstream L2 switch and is configured at theaggregator by the operator.

The router function is provided by a series of modules. To implementOSPF virtual routers, provider router and steering function, a RoutingInformation Base (RIB), Routing Table Manager (RTM), External TableManager (XTM), OSPF stack, and Forwarding Table Manager (FTM). Avirtualization module and interface state handler are also provided. Toimplement forwarding table distribution and integration to othermodules, a Forwarding Table Manager (FTM) including a Subscriber Tree,Forwarding Tree, and Next hop block are utilized. A VPN tableconfiguration and routing module, a VLAN configuration and handlingmodule, MIBs and an access function and debugging module are alsoprovided.

The content services aggregator is capable of running a plurality ofvirtual routers. In one embodiment, one virtual router is designated topeer with the core routers 1510 through the un-trusted interfaces 1515,providing transit traffic capabilities. A separate virtual routerVR1-VRn is also provided for each of a number of secure content domains(SCD) and covers a subset of the trusted sub-interfaces 1530. Eachvirtual router is capable of supporting connected and static routes, aswell as dynamic routing through the OSPF routing protocol.

Each virtual router can be thought of as a router at the edge of eachSCD's autonomous system (AS). As is well known in OSPF parlance, an ASis the largest entity within which the OSPF protocol can operate withina hierarchy. Instead of using boarder gateway protocol (BGP) to peerwith other virtual routers within the AS, the routing table of a virtualrouter includes routes learned or configured from other virtual routers.These routes may be announced to the routing domain associated with avirtual router through redistribution to the OSPF process.

The content services aggregator maintains a separate routing table foreach virtual router in the system. Because every virtual router peerswith every other virtual router in the system, a consistent routing viewis maintained even across SCDs.

The one exception to this is in the implementation of private routes.Any route (connected, static or OSPF) that is originated within aspecific virtual router may be marked as private. Private routes staywithin the context of the originating virtual router and do not getreflected in the routing tables of other virtual routers. This makes itpossible for administrators to maintain separate addressing and routingcontexts for different SCDs.

In one embodiment, the a routing stack supports: dynamic and static ARPentries; static route entries (with dynamic resolution); routing and ARPtable debugging; dynamic reconfiguration; Out-of-band configuration andprivate route selection. The OSPF Routing Protocol supports: RFC2328OSPF Version 2; clear text and cryptographic authentication; debuggingoutput; dynamic reconfiguration through the CLI; route redistributionselection using route-maps and access-lists; and private route selectionusing route-maps and access-lists.

The OSPF components of the routers run on the Control Authority computeelement and build up the XTM. The XTM module is then used to build theRTM which contains the best route across all routing protocols. The RTMmodule is then used to build the forwarding table, that, in turn, addappropriate routes.

The forwarding table is built in the Control Authority and thendistributed across to the compute elements on the processing pipelines.The forwarding table contains the routes learned via OSPF and staticroutes. The forwarding table is used on the route lookups at theprocessing pipelines. The forwarding table manager handles fast pathforwarding, equal-cost multi-path, and load balancing. Load balancingfor equal cost paths is achieved by rotating the path used for each flowthrough the contending paths for the flow. The flow table has pointersto the forwarding table for the routes that have been looked up.

The VPN table consists of the IP addresses in the subscriber's VPNcontext. These addresses are sent on the IPSec tunnel providing securerouting across Internet for the VPN set up for the distributed VPNsubnets. This IPSec tunnel consists of the end-to-end tunnels betweenthe local and remote gateways. The operator setting up the VPNconfigures the SPD information.

Where two aggregators are used as a failover pair, a failover moduleprovides failure recovery between a pair of content service aggregators.The master content aggregation device is elected by a leader electionprotocol based first on priority and secondly on IP address. The backupis the next best switch based on these two parameters. In oneembodiment, only one backup is configured and used. Traffic from thesubscribers is associated with a virtual router which in turn isassociated with a single master/provider router living on a contentservice device. On failure of the content service aggregator, the backuptakes up the functionality of the master. The master alive sent outperiodically by the elected master to the other content service in thereplication configuration. Failure of the master is detected by absenceof a master alive signal or the volunteer release of ownership as masterby sending a priority zero master alive to other content serviceaggregator. The master alive is sent on all the ports on the replicationmaster switch. Also periodically, the OSPF virtual routers' stateinformation, Firewall, NAT and VPN state information is sent across theFailure link directly to the failure links of the other content serviceaggregators(s). Only the master responds to the packets destined for thesubscribers it is currently managing. On the failure of the master, thebackup takes over as the master.

The operator configures VLAN table information by copying the tagmapping on the downstream L2 switch. The port tagging is configured onthe downstream switch. The VLAN tag is stripped out at the virtualrouter before sending up the IP stack. Incoming packets from upstreamare sent to the public destination address by the provider router. VPNaddresses are tunneled through the appropriate IPSec tunnel. The tunnelinformation is used to figure out the correct subscriber and thus itsVLAN tag is read from the VLAN table. This tag is inserted in theEthernet packet before sending out downstream.

1. SSL

In a manner similar to other services provided herein, the SSL modulecooperates with the flow stage and the Control Authority to provide SSLencryption and decryption services. In one embodiment, the SSL methodemployed may be those specified in co-pending U.S. patent applicationSer. No. 09/900,515, filed Jul. 6, 2001 by Michael Freed, ElangoGannesan and Praveen Patnala, entitled SECURE SOCKETS LAYER PROTOCOL CUTTHROUGH ARCHITECTURE {Attorney Docket Number: NEXSI-01011US0} inventorsMichael Freed and Elango Ganesen, and hereby fully incorporated byreference herein.

In general, the flow stage will broadcast a send/request query todetermine which processing pipeline is able to handle the SSL processingflow. The Control Authority receiving the queues will verify load on allCPUs in the compute elements and determine whether the SSL flows existfor same IP pair, and then select a CPU to perform the SSL. An entry inthe flow table is then made and a response to the Control Authority witha flow hint is made. The flow hint contains information about the flowstate, the corresponding CPU's ID and index to the SSL Certificate Base.Next, the CPU calculates a hash value for the Virtual ID's Certificate,saves it into SSL Certificate Base and pre-fetches the Certificate'shash entry.

The flow stage will then send the IP packet with hint information in thecrossbar switch header to the compute engine. In one embodiment, thismeans sending the packet to the compute element's MAC which will extractthe CPU_ID from the hint. If the CPU_ID is not null, it will put thepacket in a particular CPU's queue. If the CPU_ID does not exist, aselection process to select an appropriate CPU may be implemented.

In the implementation using multi-processor 2010, as described below,for compute elements, each CPU will pass through its CPU input queue toobtain a number of entries and issue pre-fetches for packets. This willremove a packet entry from the input queue and add it to a packetpre-fetch waiting queue. As the CPU is going through packet pre-fetchwaiting queue, it will get the packet entry, verify the hint, issuepre-fetch for the SSL Certificate Base (if it is a first SSL packet,then calculate Cert Hash and issue pre-fetch for it), move it to SSLCertificate Base waiting queue. Finally it will retrieve the packet.

The system must respond to the SSL handshake sequence before proceedingwith description. The “threeway handshake” is the procedure used toestablish a TCP/IP connection. This procedure normally is initiated byone TCP device (the client) and responded to by another TCP device (theserver). The procedure also works if two TCP simultaneously initiate theprocedure.

The simplest TCP/IP three-way handshake begins by the client sending aSYN segment indicating that it will use sequence numbers starting withsome sequence number, for example sequence number 100. Subsequently, theserver sends a SYN and an ACK, which acknowledges the SYN it receivedfrom the client. Note that the acknowledgment field indicates the serveris now expecting to hear sequence 101, acknowledging the SYN whichoccupied sequence 100. The client responds with an empty segmentcontaining an ACK for the server's SYN; the client may now sendencrypted data.

In the system of the present invention, the flow stage will send a SYNpacket with Hint information in Mercury header to SSL's MAC CPU, whichextract CPU ID from the hint and if it not 0, then put packet toparticular CPU's queue. If CPU_ID not exist (0) then MAC CPU use around-robin type process to select appropriate CPU.

In response the client Hello in the SSL sequence, the system prepares toperform SSL. In the implementation of the present invention, the CPUreceives Client Hello and issues a pre-fetch for the securitycertificate. In response to the Client Hello, the system prepares thecompute element for the SHA calculation and the MD5 calculations. Next,an ACK will be sent back to the server using the system architectureTCP. Next, a Server Hello is prepared, and any necessary calculationsmade using the compute element dedicated to this task. The ControlAuthority then prepares the server certificate message and sets thecompute element for the server certificate message. Finally a serverhello done message is prepared with the necessary calculations beingmade by the compute element and the server hello done is sent.

Next, the client key exchange occurs and the RSA and SHA calculationsare performed by the compute element.

When the RSA exponentiation is finished, the handshake hash calculationis performed using the compute element and the master secret isdecrypted. The pre-shared keys are derived from the master secret and afinished message is prepared. The packet can then be sent to theprocessing pipeline for SSL processing. Once the computations arefinished, the packed may be forwarded.

When the client is finished sending data, handshake calculations arepreformed by the compute element and compared by the Control Authoritywith the calculated hashes for verification. Alerts may be generated ifthey do not match.

It will be recognized that other services can be provided in accordancewith the present invention in a similar manner of distributing thecomputational aspects of each service to a compute element and themanagerial aspects to a Control Authority. In this manner, the number offlows can be scaled by increasing the number of processing pipelineswithout departing from the scope of the present invention. Theseservices include Web switching, QOS and bandwidth management.

In addition, it should be recognized that the system of the presentinvention can be managed using the management system defined in U.S.patent application Ser. No. 09/900,482, filed Jul. 6, 2001 by ElangoGannesan, Taqi Hasan, Allen B. Rochkind and Sagar Golla, entitledNETWORK MANAGEMENT SYSTEM {Attorney Docket No.: NEXSI-01025US0} and U.S.patent application Ser. No. ______, filed Jul. 5, 2002 by Taqi Hasan andElango Gannesan, entitled INTEGRATED RULE NETWORK MANAGEMENT SYSTEM{Attorney Docket No.: NEXSI-01252US0}. In that system, a virtualmanagement system for a data center, and includes a management topologypresenting devices, facilities, subscribers and services as objects toan administrative interface; and a configuration manager implementingchanges to objects in the topology responsive to configuration inputfrom an administrator via the administrative interface. A graphical userinterface designed to work in a platform independent environment may beused to manage the system.

II. Multi-Processor Hardware Platform

A. Multi-Processing Unit

FIG. 16 illustrates a multi-processor unit (MPU) in accordance with thepresent invention. In one embodiment, each processing element 100appearing in FIG. 4 above is MPU 2010. MPU 2010 includes processingclusters 2012, 2014, 2016, and 2018, which perform applicationprocessing for MPU 2010. Each processing cluster 2012, 2014, 2016, and2018 includes at least one compute engine (not shown) coupled to a setof cache memory (not shown). The compute engine processes applications,and the cache memory maintains data locally for use during thoseapplications. MPU 2010 assigns applications to each processing clusterand makes the necessary data available in the associated cache memory.

MPU 2010 overcomes drawbacks of traditional multi-processor systems. MPU2010 assigns tasks to clusters based on the applications they perform.This allows MPU 2010 to utilize engines specifically designed to performtheir assigned tasks. MPU 2010 also reduces time consuming accesses tomain memory 2026 by passing cache data between clusters 2012, 2014,2016, and 2018. The local proximity of the data, as well as theapplication specialization, expedites processing.

Global snoop controller 2022 manages data sharing between clusters 2012,2014, 2016, and 2018 and main memory 2026. Clusters 2012, 2014, 2016,and 2018 are each coupled to provide memory requests to global snoopcontroller 2022 via point-to-point connections. Global snoop controller2022 issues snoop instructions to clusters 2012, 2014, 2016, and 2018 ona snoop ring.

In one embodiment, as shown in FIG. 16, clusters 2012, 2014, 2016, and2018 are coupled to global snoop controller 2022 via point-to-pointconnections 2013, 2015, 2017, and 2019, respectively. A snoop ringincludes coupling segments 2021 ₁₋₄, which will be collectively referredto as snoop ring 2021. Segment 2021 ₁ couples global snoop controller2022 to cluster 2018. Segment 2021 ₂ couples cluster 2018 to cluster2012. Segment 2021 ₃ couples cluster 2012 to cluster 2014. Segment 2021₄ couples cluster 2014 to cluster 2016. The interaction between globalsnoop controller 2022 and clusters 2012, 2014, 2016, and 2018 will bedescribed below in greater detail.

Global snoop controller 2022 initiates accesses to main memory 2026through external bus logic (EBL) 2024, which couples snoop controller2022 and clusters 2012, 2014, 2016, and 2018 to main memory 2026. EBL2024 transfers data between main memory 2026 and clusters 2012, 2014,2016, and 2018 at the direction of global snoop controller 2022. EBL2024 is coupled to receive memory transfer instructions from globalsnoop controller 2022 over point-to-point link 2011.

EBL 2024 and processing clusters 2012, 2014, 2016, and 2018 exchangedata with each other over a logical data ring. In one embodiment of theinvention, MPU 2010 implements the data ring through a set ofpoint-to-point connections. The data ring is schematically representedin FIG. 16 as coupling segments 2020 ₁₋₅ and will be referred to as dataring 2020. Segment 2020 ₁ couples cluster 2018 to cluster 2012. Segment2020 ₂ couples cluster 2012 to cluster 2014. Segment 2020 ₃ couplescluster 2014 to cluster 2016. Segment 2020 ₄ couples cluster 2016 to EBL2024, and segment 2020 ₅ couples EBL 2024 to cluster 2018. Furtherdetails regarding the operation of data ring 2020 and EBL 2024 appearbelow.

FIG. 17 illustrates a process employed by MPU 2010 to transfer data andmemory location ownership in one embodiment of the present invention.For purposes of illustration, FIG. 17 demonstrates the process withcluster 2012—the same process is applicable to clusters 2014, 2016, and2018.

Processing cluster 2012 determines whether a memory location for anapplication operation is mapped into the cache memory in cluster 2012(step 2030). If cluster 2012 has the location, then cluster 2012performs the operation (step 2032). Otherwise, cluster 2012 issues arequest for the necessary memory location to global snoop controller2022 (step 2034). In one embodiment, cluster 2012 issues the request viapoint-to-point connection 2013. As part of the request, cluster 2012forwards a request descriptor that instructs snoop controller 2022 andaids in tracking a response to the request.

Global snoop controller 2022 responds to the memory request by issuing asnoop request to clusters 2014, 2016, and 2018 (step 2036). The snooprequest instructs each cluster to transfer either ownership of therequested memory location or the location's content to cluster 2012.Clusters 2014, 2016, and 2018 each respond to the snoop request byperforming the requested action or indicating it does not possess therequested location (step 2037). In one embodiment, global snoopcontroller 2022 issues the request via snoop ring 2021, and clusters2014, 2016, and 2018 perform requested ownership and data transfers viasnoop ring 2021. In addition to responding on snoop ring 2021, clustersacknowledge servicing the snoop request through their point-to-pointlinks with snoop controller 2022. Snoop request processing will beexplained in greater detail below.

If one of the snooped clusters possesses the requested memory, thesnooped cluster forwards the memory to cluster 2012 using data ring 2020(step 2037). In one embodiment, no data is transferred, but therequested memory location's ownership is transferred to cluster 2012.Data and memory location transfers between clusters will be explained ingreater detail below.

Global snoop controller 2022 analyzes the clusters' snoop responses todetermine whether the snooped clusters owned and transferred the desiredmemory (step 2038). If cluster 2012 obtained access to the requestedmemory location in response to the snoop request, cluster 2012 performsthe application operations (step 2032). Otherwise, global snoopcontroller 2022 instructs EBL 2024 to carry out an access to main memory2026 (step 2040). EBL 2024 transfers data between cluster 2012 and mainmemory 2026 on data ring 2020. Cluster 2012 performs the applicationoperation once the main memory access is completed (step 2032).

B. Processing Cluster

In one embodiment of the present invention, a processing clusterincludes a single compute engine for performing applications. Inalternate embodiments, a processing cluster employs multiple computeengines. A processing cluster in one embodiment of the present inventionalso includes a set of cache memory for expediting applicationprocessing. Embodiments including these features are described below.

1. Processing Cluster—Single Compute Engine

FIG. 18 shows one embodiment of a processing cluster in accordance withthe present invention. For purposes of illustration, FIG. 18 showsprocessing cluster 2012. In some embodiments of the present invention,the circuitry shown in FIG. 18 is also employed in clusters 2014, 2016,and 2018.

Cluster 2012 includes compute engine 2050 coupled to first tier datacache 2052, first tier instruction cache 2054, second tier cache 2056,and memory management unit (MMU) 2058. Both instruction cache 2054 anddata cache 2052 are coupled to second tier cache 2056, which is coupledto snoop controller 2022, snoop ring 2021, and data ring 2020. Computeengine 2050 manages a queue of application requests, each requiring anapplication to be performed on a set of data.

When compute engine 2050 requires access to a block of memory, computeengine 2050 converts a virtual address for the block of memory into aphysical address. In one embodiment of the present invention, computeengine 2050 internally maintains a limited translation buffer (notshown). The internal translation buffer performs conversions withincompute engine 2050 for a limited number of virtual memory addresses.

Compute engine 2050 employs MMU 2058 for virtual memory addressconversions not supported by the internal translation buffer. In oneembodiment, compute engine 2050 has separate conversion requestinterfaces coupled to MMU 2058 for data accesses and instructionaccesses. As shown in FIG. 18, compute engine 2050 employs requestinterfaces 2070 and 2072 for data accesses and request interface 2068for instruction access.

In response to a conversion request, MMU 2058 provides either a physicaladdress and memory block size or a failed access response. The failedaccess responses include: 1) no corresponding physical address exists;2) only read access is allowed and compute engine 2050 is attempting towrite; or 3) access is denied.

After obtaining a physical address, compute engine 2050 provides theaddress to either data cache 2052 or instruction cache 2054—dataaccesses go to data cache 2052, and instruction accesses go toinstruction cache 2054. In one embodiment, first tier caches 2052 and2054 are 4K direct-mapped caches, with data cache 2052 beingwrite-through to second tier cache 2056. In an alternate embodiment,caches 2052 and 2054 are 8K 2-way set associative caches.

A first tier cache (2052 or 2054) addressed by compute engine 2050determines whether the addressed location resides in the addressed firsttier cache. If so, the cache allows compute engine 2050 to perform therequested memory access. Otherwise, the first tier cache forwards thememory access of compute engine 2050 to second tier cache 2056. In oneembodiment second tier cache 2056 is a 64K 4-way set associative cache.

Second tier cache 2056 makes the same determination as the first tiercache. If second tier cache 2056 contains the requested memory location,compute engine 2050 exchanges information with second tier cache 2056through first tier cache 2052 or 2054. Instructions are exchangedthrough instruction cache 2054, and data is exchanged through data cache2052. Otherwise, second tier cache 2056 places a memory request toglobal snoop controller 2022, which performs a memory retrieval process.In one embodiment, the memory retrieval process is the process describedabove with reference to FIG. 17. Greater detail and embodimentsaddressing memory transfers will be described below.

Cache 2056 communicates with snoop controller 2022 via point-to-pointlink 2013 and snoop ring interfaces 2021 ₁ and 2021 ₃, as described inFIG. 16. Cache 2056 uses link 2013 to request memory accesses outsidecluster 2012. Second tier cache 2056 receives and forwards snooprequests on snoop ring interfaces 2021 ₂ and 2021 ₃. Cache 2056 usesdata ring interface segments 2020 ₁ and 2020 ₂ for exchanging data ondata ring 2020, as described above with reference to FIGS. 16 and 17.

In one embodiment, compute engine 2050 contains CPU 2060 coupled tocoprocessor 2062. CPU 2060 is coupled to MMU 2058, data cache 2052, andinstruction cache 2054. Instruction cache 2054 and data cache 2052couple CPU 2060 to second tier cache 2056. Coprocessor 2062 is coupledto data cache 2052 and MMU 2058. First tier data cache 2052 couplescoprocessor 2062 to second tier cache 2056.

Coprocessor 2062 helps MPU 2010 overcome processor utilization drawbacksassociated with traditional multi-processing systems. Coprocessor 2062includes application specific processing engines designed to executeapplications assigned to compute engine 2050. This allows CPU 2060 tooffload application processing to coprocessor 2062, so CPU 2060 caneffectively manage the queue of assigned application.

In operation, CPU 2060 instructs coprocessor 2062 to perform anapplication from the application queue. Coprocessor 2062 uses itsinterfaces to MMU 2058 and data cache 2052 to obtain access to thememory necessary for performing the application. Both CPU 2060 andcoprocessor 2062 perform memory accesses as described above for computeengine 2050, except that coprocessor 2062 doesn't perform instructionfetches.

In one embodiment, CPU 2060 and coprocessor 2062 each include limitedinternal translation buffers for converting virtual memory addresses tophysical addresses. In one such embodiment, CPU 2060 includes 2translation buffer entries for instruction accesses and 3 translationbuffer entries for data accesses. In one embodiment, coprocessor 2062includes 4 translation buffer entries.

Coprocessor 2062 informs CPU 2060 once an application is complete. CPU2060 then removes the application from its queue and instructs a newcompute engine to perform the next application—greater details onapplication management will be provided below.

2. Processing Cluster—Multiple Compute Engines

FIG. 19 illustrates an alternate embodiment of processing cluster 2012in accordance with the present invention. In FIG. 19, cluster 2012includes multiple compute engines operating the same as above-describedcompute engine 2050. Cluster 2012 includes compute engine 2050 coupledto data cache 2052, instruction cache 2054, and MMU 2082. Compute engine2050 includes CPU 2060 and coprocessor 2062 having the same coupling andoperation described above in FIG. 18. In fact, all elements appearing inFIG. 19 with the same numbering as in FIG. 18 have the same operation asdescribed in FIG. 18.

MMU 2082 and MMU 2084 operate the same as MMU 2058 in FIG. 18, exceptMMU 2082 and MMU 2084 each support two compute engines. In an alternateembodiment, cluster 2012 includes 4 MMUs, each coupled to a singlecompute engine. Second tier cache 2080 operates the same as second tiercache 2056 in FIG. 18, except second tier cache 2080 is coupled to andsupports data caches 2052, 2092, 2096, and 2100 and instruction caches2054, 2094, 2098, and 2102. Data caches 2052, 2092, 2096, and 2100 inFIG. 19 operate the same as data cache 2052 in FIG. 18, and instructioncaches 2054, 2094, 2098, and 2102 operate the same as instruction cache2054 in FIG. 18. Compute engines 2050, 2086, 2088, and 2090 operate thesame as compute engine 2050 in FIG. 18.

Each compute engine (2050, 2086, 2088, and 2090) also includes a CPU(2060, 2116, 2120, and 2124, respectively) and a coprocessor (2062,2118, 2122, and 2126, respectively) coupled and operating the same asdescribed for CPU 2060 and coprocessor 2062 in FIG. 18. Each CPU (2060,2116, 2120, and 2124) is coupled to a data cache (2052, 2092, 2096, and2100, respectively), instruction cache (2054, 2094, 2098, and 2102,respectively), and MMU (2082 and 2084). Each coprocessor (2062, 2118,2122, and 2126, respectively) is coupled to a data cache (2052, 2092,2096, and 2100, respectively) and MMU (2082 and 2084). Each CPU (2060,2116, 2120, and 2124) communicates with the MMU (2082 and 2084) viaseparate conversion request interfaces for data (2070, 20106, 2110, and2114, respectively) and instructions (2068, 20104, 20108, and 20112,respectively) accesses. Each coprocessor (2062, 20118, 20122, and 20126)communicates with the MMU (2082 and 2084) via a conversion requestinterface (2072, 2073, 2074, and 2075) for data accesses.

In one embodiment, each coprocessor (2062, 2118, 2122, and 2126)includes four internal translation buffers, and each CPU (2060, 2116,2120, and 2124) includes 5 internal translation buffers, as describedabove with reference to FIG. 18. In one such embodiment, translationbuffers in coprocessors coupled to a common MMU contain the same addressconversions.

In supporting two compute engines, MMU 2082 and MMU 2084 each providearbitration logic to chose between requesting compute engines. In oneembodiment, MMU 2082 and MMU 2084 each arbitrate by servicing competingcompute engines on an alternating basis when competing addresstranslation requests are made. For example, in such an embodiment, MMU2082 first services a request from compute engine 2050 and then servicesa request from compute engine 2086, when simultaneous translationrequests are pending.

3. Processing Cluster Memory Management

The following describes a memory management system for MPU 2010 in oneembodiment of the present invention. In this embodiment, MPU 2010includes the circuitry described above with reference to FIG. 19.

a. Data Ring

Data ring 2020 facilitates the exchange of data and instructions betweenclusters 2012, 2014, 2016, and 2018 and EBL 2024. Data ring 2020 carriespackets with both header information and a payload. The payload containseither data or instructions from a requested memory location. Inoperation, either a cluster or EBL 2024 places a packet on a segment ofdata ring 2020. For example, cluster 2018 drives data ring segment 2020,into cluster 2012. The header information identifies the intended targetfor the packet. The EBL and each cluster pass the packet along data ring2020 until the packet reaches the intended target. When a packet reachesthe intended target (EBL 2024 or cluster 2012, 2014, 2016, or 2018) thepacket is not transferred again.

In one embodiment of the present invention, data ring 2020 includes thefollowing header signals: 1) Validity—indicating whether the informationon data ring 2020 is valid; 2) Cluster—identifying the cluster thatissues the memory request leading to the data ring transfer; 3) MemoryRequest—identifying the memory request leading to the data ringtransfer; 4) MESI—providing ownership status; and 5) TransferDone—indicating whether the data ring transfer is the last in aconnected series of transfers. In addition to the header, data ring 2020includes a payload. In one embodiment, the payload carries 32 bytes. Inalternate embodiments of the present invention, different fields can beemployed on the data ring.

In some instances, a cluster needs to transfer more bytes than a singlepayload field can store. For example, second tier cache 2080 typicallytransfers an entire 64 byte cache line. A transfer of this size is madeusing two transfers on data ring 2020—each carrying a 32 byte payload.By using the header information, multiple data ring payload transferscan be concatenated to create a single payload in excess of 32 bytes. Inthe first transfer, the Transfer Done field is set to indicate thetransfer is not done. In the second transfer, the Transfer Done fieldindicates the transfer is done.

The MESI field provides status about the ownership of the memorylocation containing the payload. A device initiating a data ringtransfer sets the MESI field, along with the other header information.The MESI field has the following four states: 1) Modified; 2) Exclusive;3) Shared; and 4) Invalid. A device sets the MESI field to Exclusive ifthe device possesses sole ownership of the payload data prior totransfer on data ring 2020. A device sets the MESI field to Modified ifthe device modifies the payload data prior to transfer on data ring2020—only an Exclusive or Modified owner can modify data. A device setsthe MESI field to Shared if the data being transferred onto data ring2020 currently has a Shared or Exclusive setting in the MESI field andanother entity requests ownership of the data. A device sets the MESIfield to Invalid if the data to be transferred on data ring 2020 isinvalid. Examples of MESI field setting will be provided below.

b. First Tier Cache Memory

FIG. 20 a illustrates a pipeline of operations performed by first tierdata caches 2052, 2092, 2096, 2100, in one embodiment of the presentinvention. For ease of reference, FIG. 20 is explained with reference todata cache 2052, although the implementation shown in FIG. 20 isapplicable to all first tier data caches.

In stage 2360, cache 2052 determines whether to select a memory accessrequest from CPU 2060, coprocessor 2062, or second tier cache 2080. Inone embodiment, cache 2052 gives cache 2080 the highest priority andtoggles between selecting the CPU and coprocessor. As will be explainedbelow, second tier cache 2080 accesses first tier cache 2052 to providefill data when cache 2052 has a miss.

In stage 2362, cache 2052 determines whether cache 2052 contains thememory location for the requested access. In one embodiment, cache 2052performs a tag lookup using bits from the memory address of the CPU,coprocessor, or second tier cache. If cache 2052 detects a memorylocation match, the cache's data array is also accessed in stage 2362and the requested operation is performed.

In the case of a load operation from compute engine 2050, cache 2052supplies the requested data from the cache's data array to computeengine 2050. In the case of a store operation, cache 2052 stores datasupplied by compute engine 2050 in the cache's data array at thespecified memory location. In one embodiment of the present invention,cache 2052 is a write-through cache that transfers all stores through tosecond tier cache 2080. The store operation only writes data into cache2052 after a memory location match—cache 2052 is not filled after amiss. In one such embodiment, cache 2052 is relieved of maintainingcache line ownership.

In one embodiment of the present invention, cache 2052 implements storesusing a read-modify-write protocol. In such an embodiment, cache 2052responds to store operations by loading the entire data array cache linecorresponding to the addressed location into store buffer 2367. Cache2052 modifies the data in store buffer 2367 with data from the storeinstruction issued by compute engine 2050. Cache 2052 then stores themodified cache line in the data array when cache 2052 has a free cycle.If a free cycle doesn't occur before the next write to store buffer2367, cache 2052 executes the store without using a free cycle.

In an alternate embodiment, the store buffer is smaller than an entirecache line, so cache 2052 only loads a portion of the cache line intothe store buffer. For example, in one embodiment cache 2052 has a 64byte cache line and a 16 byte store buffer. In load operations, databypasses store buffer 2367.

Cache 2052 also provides parity generation and checking. When cache 2052writes the data array, a selection is made in stage 2360 between usingstore buffer data (SB Data) and second tier cache fill data (ST Data).Cache 2052 also performs parity generation on the selected data in stage2360 and writes the data array in stage 2362. Cache 2052 also paritychecks data supplied from the data array in stage 2362.

If cache 2052 does not detect an address match in stage 2362, then cache2052 issues a memory request to second tier cache 2080. Cache 2052 alsoissues a memory request to cache 2080 if cache 2052 recognizes a memoryoperation as non-cacheable.

Other memory related operations issued by compute engine 2050 includepre-fetch and store-create. A pre-fetch operation calls for cache 2052to ensure that an identified cache line is mapped into the data array ofcache 2052. Cache 2052 operates the same as a load operation of a fullcache line, except no data is returned to compute engine 2050. If cache2052 detects an address match in stage 2362 for a pre-fetch operation,no further processing is required. If an address miss is detected, cache2052 forwards the pre-fetch request to cache 2080. Cache 2052 loads anydata returned by cache 2080 into the cache 2052 data array.

A store-create operation calls for cache 2052 to ensure that cache 2052is the sole owner of an identified cache line, without regard forwhether the cache line contains valid data. In one embodiment, apredetermined pattern of data is written into the entire cache line. Thepredetermined pattern is repeated throughout the entire cache line.Compute engine 2050 issues a store-create command as part of a storeoperand for storing data into an entire cache line. All store-createrequests are forwarded to cache 2080, regardless of whether an addressmatch occurs.

In one embodiment, cache 2052 issues memory requests to cache 2080 overa point-to-point link, as shown in FIGS. 18 and 19. This link allowscache 2080 to receive the request and associated data and respondaccordingly with data and control information. In one such embodiment,cache 2052 provides cache 2080 with a memory request that includes thefollowing fields: 1) Validity—indicating whether the request is valid;2) Address—identifying the memory location requested; and 3)Opcode—identifying the memory access operation requested.

After receiving the memory request, cache 2080 generates the followingadditional fields: 4) Dependency—identifying memory access operationsthat must be performed before the requested memory access; 5)Age—indicating the time period the memory request has been pending; and6) Sleep—indicating whether the memory request has been placed in sleepmode, preventing the memory request from being reissued. Sleep mode willbe explained in further detail below. Cache 2080 sets the Dependencyfield in response to the Opcode field, which identifies existingdependencies.

In one embodiment of the present invention, cache 2052 includes fillbuffer 2366 and replay buffer 2368. Fill buffer 2366 maintains a list ofmemory locations from requests transferred to cache 2080. The listedlocations correspond to requests calling for loads. Cache 2052 employsfill buffer 2366 to match incoming fill data from second tier cache 2080with corresponding load commands. The corresponding load command informscache 2052 whether the incoming data is a cacheable load for storage inthe cache 2052 data array or a non-cacheable load for direct transfer tocomputer engine 2050.

As an additional benefit, fill buffer 2366 enables cache 2052 to avoiddata corruption from an overlapping load and store to the same memorylocation. If compute engine 2050 issues a store to a memory locationlisted in fill buffer 2366, cache 2052 will not write data returned bycache 2080 for the memory location to the data array. Cache 2052 removesa memory location from fill buffer 2366 after cache 2080 services theassociated load. In one embodiment, fill buffer 2366 contains 5 entries.

Replay buffer 2368 assists cache 2052 in transferring data from cache2080 to compute engine 2050. Replay buffer 368 maintains a list of loadrequests forwarded to cache 2080. Cache 2080 responds to a load requestby providing an entire cache line—up to 64 bytes in one embodiment. Whena load request is listed in replay buffer 2368, cache 2052 extracts therequested load memory out of the returned cache line for compute engine2050. This relieves cache 2052 from retrieving the desired memory fromthe data array after a fill completes.

Cache 2052 also uses replay buffer 2368 to perform any operationsnecessary before transferring the extracted data back to compute engine2050. For example, cache 2080 returns an entire cache line of data, butin some instances compute engine 2050 only requests a portion of thecache line. Replay buffer 2368 alerts cache 2052, so cache 2052 canrealign the extracted data to appear in the data path byte positionsdesired by compute engine 2050. The desired data operations, such asrealignments and rotations, are stored in replay buffer 2368 along withtheir corresponding requests.

FIG. 20 b shows a pipeline of operations for first tier instructionscaches 2054, 2094, 2098, and 2102 in one embodiment of the presentinvention. The pipeline shown in FIG. 20 b is similar to the pipelineshown in FIG. 20 a, with the following exceptions. A coprocessor doesnot access a first tier instruction cache, so the cache only needs toselect between a CPU and second tier cache in stage 2360. A CPU does notwrite to an instruction cache, so only second tier data (ST Data) iswritten into the cache's data array in step 2362. An instruction cachedoes not include either a fill buffer, replay buffer, or store buffer.

c. Second Tier Cache Memory

FIG. 21 illustrates a pipeline of operations implemented by second tiercache 2080 in one embodiment of the present invention. In stage 2370,cache 2080 accepts memory requests. In one embodiment, cache 2080 iscoupled to receive memory requests from external sources (Fill), globalsnoop controller 2022 (Snoop), first tier data caches 2052, 2092, 2096,and 2100 (FTD-2052; FTD-2092; FTD-2096; FTD-2100), and first tierinstruction caches 2054, 2094, 2098, and 2102 (FTI-2054; FTI-2094;FTI-2098; FTI-2102). In one embodiment, external sources includeexternal bus logic 2024 and other clusters seeking to drive data on dataring 20.

As shown in stage 2370, cache 2080 includes memory request queues 2382,2384, 2386, and 2388 for receiving and maintaining memory requests fromdata caches 2054, 2052, 2092, 2096, and 2100, respectively. In oneembodiment, memory request queues 2382, 2384, 2386, and 2388 hold up to8 memory requests. Each queue entry contains the above-described memoryrequest descriptor, including the Validity, Address, Opcode, Dependency,Age, and Sleep fields. If a first tier data cache attempts to make arequest when its associated request queue is full, cache 2080 signalsthe first tier cache that the request cannot be accepted. In oneembodiment, the first tier cache responds by submitting the requestlater. In an alternate embodiment, the first tier cache kills therequested memory operation.

Cache 2080 also includes snoop queue 2390 for receiving and maintainingrequests from snoop ring 2021. Upon receiving a snoop request, cache2080 buffers the request in queue 2390 and forwards the request to thenext cluster on snoop ring 2021. In one embodiment of the presentinvention, global snoop controller 2022 issues the following types ofsnoop requests: 1) Own—instructing a cluster to transfer exclusiveownership of a memory location and transfer its content to anothercluster after performing any necessary coherency updates; 2)Share—instructing a cluster to transfer shared ownership of a memorylocation and transfer its contents to another cluster after performingany necessary coherency updates; and 3) Kill—instructing a cluster torelease ownership of a memory location without performing any datatransfers or coherency updates.

In one such embodiment, snoop requests include descriptors with thefollowing fields: 1) Validity—indicating whether the snoop request isvalid; 2) Cluster—identifying the cluster that issued the memory requestleading to the snoop request; 3) Memory Request—identifying the memoryrequest leading to the snoop request; 4) ID—an identifier global snoopcontroller 2022 assigns to the snoop request; 5) Address—identifying thememory location requested; and 5) Opcode—identifying the type of snooprequest.

Although not shown, cache 2080 includes receive data buffers, inaddition to the request queues shown in stage 2370. The receive databuffers hold data passed from cache 2052 for use in requested memoryoperations, such as stores. In one embodiment, cache 2080 does notcontain the receive data buffers for data received from data ring 2020along with Fill requests, since Fill requests are serviced with thehighest priority.

Cache 2080 includes a scheduler for assigning priority to theabove-described memory requests. In stage 2370, the scheduler begins theprioritization process by selecting requests that originate from snoopqueue 390 and each of compute engines 2050, 2086, 2088, and 2090, if anyexist. For snoop request queue 2390, the scheduler selects the firstrequest with a Validity field showing the request is valid. In oneembodiment, the scheduler also selects an entry before it remains inqueue 2390 for a predetermined period of time.

For each compute engine, the scheduler gives first tier instructioncache requests (FTI) priority over first tier data cache requests (FTD).In each data cache request queue (2382, 2384, 2386, and 2388), thescheduler assigns priority to memory requests based on predeterminedcriteria. In one embodiment, the predetermined criteria areprogrammable. A user can elect to have cache 2080 assign priority basedon a request's Opcode field or the age of the request. The scheduleremploys the above-described descriptors to make these prioritydeterminations.

For purposes of illustration, the scheduler's programmableprioritization is described with reference to queue 2382. The sameprioritization process is performed for queues 2384, 2386, and 2388. Inone embodiment, priority is given to load requests. The scheduler incache 2080 reviews the Opcode fields of the request descriptors in queue2382 to identify all load operations. In an alternate embodiment, storeoperations are favored. The scheduler also identifies these operationsby employing the Opcode field.

In yet another embodiment, cache 2080 gives priority to the oldestrequests in queue 2382. The scheduler in cache 2080 accesses the Agefield in the request descriptors in queue 2382 to determine the oldestmemory request. Alternative embodiments also provide for giving priorityto the newest request. In some embodiments of the present invention,prioritization criteria are combined. For example, cache 2080 givespriority to load operations and a higher priority to older loadoperations. Those of ordinary skill in the art recognize that manypriority criteria combinations are possible.

In stage 2372, the scheduler selects a single request from thefollowing: 1) the selected first tier cache requests; 2) the selectedsnoop request from stage 2370; and 3) Fill. In one embodiment, thescheduler gives Fill the highest priority, followed by Snoop, which isfollowed by the first tier cache requests. In one embodiment, thescheduler in cache 2080 services the first tier cache requests on around robin basis.

In stage 2374, cache 2080 determines whether it contains the memorylocation identified in the selected request from stage 2372. If theselected request is Fill from data ring 2020, cache 2080 usesinformation from the header on data ring 2020 to determine whether thecluster containing cache 2080 is the target cluster for the data ringpacket. Cache 2080 examines the header's Cluster field to determinewhether the Fill request corresponds to the cluster containing cache2080.

If any request other than Fill is selected in stage 2372, cache 2080uses the Address field from the corresponding request descriptor toperform a tag lookup operation. In the tag lookup operation, cache 2080uses one set of bits in the request descriptor's Address field toidentify a targeted set of ways. Cache 2080 then compares another set ofbits in the Address field to tags for the selected ways. If a tag matchoccurs, the requested memory location is in the cache 2080 data array.Otherwise, there is a cache miss. In one such embodiment, cache 2080 isa 64K 4-way set associative cache with a cache line size of 64 bytes.

In one embodiment, as shown in FIG. 21, cache 2080 performs the taglookup or Cluster field comparison prior to reading any data from thedata array in cache 2080. This differs from a traditional multiple-wayset associate cache. A traditional multiple-way cache reads a line ofdata from each addressed way at the same time a tag comparison is made.If there is not a match, the cache discards all retrieved data. If thereis a match, the cache employs the retrieved data from the selected way.Simultaneously retrieving data from multiple ways consumes considerableamounts of both power and circuit area.

Conserving both power and circuit area are important considerations inmanufacturing integrated circuits. In one embodiment, cache 2080 isformed on a single integrated circuit. In another embodiment, MPU 2010is formed on a single integrated circuit. Performing the lookups beforeretrieving cache memory data makes cache 2080 more suitable forinclusion on a single integrated circuit.

In stage 2376, cache 2080 responds to the cache address comparisonperformed in stage 2374. Cache 2080 contains read external request queue(“read ERQ”) 2392 and write external request queue (“write ERQ”) 2394for responding to hits and misses detected in stage 2374. Read ERQ 2392and write ERQ 2394 allow cache 2080 to forward memory access requests toglobal snoop controller 2022 for further processing.

In one embodiment, read ERQ 2392 contains 16 entries, with 2 entriesreserved for each compute engine. Read ERQ 2392 reserves entries,because excessive pre-fetch operations from one compute engine mayotherwise consume the entire read ERQ. In one embodiment, write ERQ 2394includes 4 entries. Write ERQ 2394 reserves one entry for requests thatrequire global snoop controller 2022 to issue snoop requests on snoopring 2021.

Processing First Tier Request Hits: Once cache 2080 detects an addressmatch for a first tier load or store request, cache 2080 accessesinternal data array 2396, which contains all the cached memorylocations. The access results in data array 2396 outputting a cache linecontaining the addressed memory location in stage 2378. In oneembodiment, the data array has a 64 byte cache line and is formed by 88K buffers, each having a data path 8 bytes wide. In such an embodiment,cache 2080 accesses a cache line by addressing the same offset addressin each of the 8 buffers.

An Error Correcting Code (“ECC”) check is performed on the retrievedcache line to check and correct any cache line errors. ECC is awell-known error detection and correction operation. The ECC operationoverlaps between stages 2378 and 2380.

If the requested operation is a load, cache 2080 supplies the cache linecontents to first tier return buffer 2391. First tier return buffer 2391is coupled to provide the cache line to the requesting first tier cache.In one embodiment of the present invention, cache 2080 includes multiplefirst tier return buffers (not shown) for transferring data back tofirst tier caches. In one such embodiment, cache 2080 includes 4 firsttier return buffers.

If the requested operation is a store, cache 2080 performs aread-modify-write operation. Cache 2080 supplies the addressed cacheline to store buffer 2393 in stage 2380. Cache 2080 modifies the storebuffer bytes addressed by the first tier memory request. Cache 2080 thenforwards the contents of the store buffer to data array 2396. Cache 2080makes this transfer once cache 2080 has an idle cycle or a predeterminedperiod of time elapses. For stores, no data is returned to first tierdata cache 2052.

FIG. 22 illustrates the pipeline stage operations employed by cache 2080to transfer the cache line in a store buffer to data array 2396 andfirst tier return buffer 2393. This process occurs in parallel with theabove-described pipeline stages. In stage 2374, cache 2080 selectsbetween pending data array writes from store buffer 2393 and data ring2020 via Fill requests. In one embodiment, Fill requests take priority.In one such embodiment, load accesses to data array 2396 have priorityover writes from store buffer 2393. In alternate embodiments, differentpriorities are assigned.

In stage 2376, cache 2080 generates an ECC checksum for the dataselected in stage 2374. In stage 2378, cache 2080 stores the modifiedstore buffer data in the cache line corresponding to the first tierrequest's Address field. Cache 2080 performs an ECC check between stages2378 and 2380. Cache 2080 then passes the store buffer data to firstreturn buffer 2391 in stage 2380 for return to the first tier cache.

If the hit request is a pre-fetch, cache 2080 operates the same asexplained above for a load.

Processing First Tier Request Misses: If the missed request's Opcodefield calls for a non-cacheable load, cache 2080 forwards the missedrequest's descriptor to read ERQ 2392. Read ERQ forwards the requestdescriptor to global snoop controller 2022, which initiates retrieval ofthe requested data from main memory 2026 by EBL 2024.

If the missed request's Opcode field calls for a cacheable load, cache2080 performs as described above for a non-cacheable load with thefollowing modifications. Global snoop controller 2022 first initiatesretrieval of the requested data from other clusters by issuing asnoop-share request on snoop ring 2021. If the snoop request does notreturn the desired data, then global snoop controller 2022 initiatesretrieval from main memory 2026 via EBL 2024. Cache 2080 also performsan eviction procedure. In the eviction procedure, cache 2080 selects alocation in the data array for a cache line of data containing therequested memory location. If the selected data array location containsdata that has not been modified, cache 2080 overwrites the selectedlocation when the requested data is eventually returned on data ring2020.

If the selected data array location has been modified, cache 2080 writesthe cache line back to main memory 2026 using write ERQ 2394 and dataring 2020. Cache 2080 submits a request descriptor to write ERQ 2394 instage 2376. The request descriptor is in the format of a first tierdescriptor. Write ERQ 2394 forwards the descriptor to global snoopcontroller 2022. Snoop controller 2022 instructs external bus logic 2024to capture the cache line off data ring 2020 and transfer it to mainmemory 2026. Global snoop controller 2022 provides external bus logic2024 with descriptor information that enables logic 2024 to recognizethe cache line on data ring 2020. In one embodiment, this descriptorincludes the above-described information found in a snoop requestdescriptor.

Cache 2080 accesses the selected cache line in data array 2396, asdescribed above, and forwards the line to data ring write buffer 2395 instages 2376 through 2380 (FIG. 21). Data ring write buffer 2395 iscoupled to provide the cache line on data ring 2020. In one embodiment,cache 2080 includes 4 data ring write buffers. Cache 2080 sets the dataring header information for two 32 byte payload transfers as follows: 1)Validity—valid; 2) Cluster—External Bus Logic 2024; 3) Memory RequestIndicator—corresponding to the request sent to write ERQ 2394; 4)MESI—Invalid; and 5) Transfer Done—set to “not done” for the first 32byte transfer and “done” for the second 32 byte transfer. The headerinformation enables EBL 2024 to capture the cache line off data ring2020 and transfer it to main memory 2026.

Cache 2080 performs an extra operation if a store has been performed onthe evicted cache line and the store buffer data has not been written tothe data array 2396. In this instance, cache 2080 utilizes the dataselection circuitry from stage 2380 (FIG. 22) to transfer the datadirectly from store buffer 2393 to data ring write buffer 2395.

If the missed request's Opcode field calls for a non-cacheable store,cache 2080 forwards the request to write ERQ 2394 in stage 2376 forsubmission to global snoop controller 2022. Global snoop controller 2022provides a main memory write request to external bus logic 2024, asdescribed above. In stage 2378 (FIG. 22), cache controller 2080 selectsthe data from the non-cacheable store operation. In stage 2380, cache2080 forwards the data to data ring write buffer 2395. Cache 2080 setsthe data ring header as follows for two 32 byte payload transfers: 1)Validity—valid; 2) Cluster—External Bus Logic 2024; 3) MemoryRequest—corresponding to the request sent to write ERQ 2394; 4)MESI—Invalid; and 5) Transfer Done—set to “not done” for the first 32byte transfer and “done” for the second 32 byte transfer.

If the missed request's Opcode field calls for a cacheable store, cache2080 performs the same operation as explained above for a missedcacheable load. This is because cache 2080 performs stores using aread-modify-write operation. In one embodiment, snoop controller 2022issues a snoop-own request in response to the read ERQ descriptor forcache 2080.

If the missed request's Opcode field calls for a pre-fetch, cache 2080performs the same operation as explained above for a missed cacheableload.

Processing First Tier Requests for Store-Create Operations: When arequest's Opcode field calls for a store-create operation, cache 2080performs an address match in storage 2374. If there is not a match,cache 2080 forwards the request to global snoop controller 2022 throughread ERQ 2392 in stage 2376. Global snoop controller 2022 responds byissuing a snoop-kill request on snoop ring 2021. The snoop-kill requestinstructs all other clusters to relinquish control of the identifiedmemory location. Second tier cache responses to snoop-kill requests willbe explained below.

If cache 2080 discovers an address match in stage 2374, cache 2080determines whether the matching cache line has an Exclusive or ModifiedMESI state. In either of these cases, cache 2080 takes no furtheraction. If the status is Shared, then cache 2080 forwards the request tosnoop controller 2022 as described above for the non-matching case.

Processing Snoop Request Hits: If the snoop request Opcode field callsfor an own operation, cache 2080 relinquishes ownership of the addressedcache line and transfers the line's contents onto data ring 2020. Priorto transferring the cache line, cache 2080 updates the line, ifnecessary.

Cache 2080 accesses data array 2396 in stage 2378 (FIG. 21) to retrievethe contents of the cache line containing the desired data—the Addressfield in the snoop request descriptor identifies the desired cache line.This access operates the same as described above for first tiercacheable load hits. Cache 2080 performs ECC checking and correction isstages 2378 and 2380 and writes the cache line to data ring write buffer2395. Alternatively, if the retrieved cache line buffer needs to beupdated, cache 2080 transfers the contents of store buffer 2393 to dataring write buffer 2395 (FIG. 22).

Cache 2080 provides the following header information to the data ringwrite buffer along with the cache line: 1) Validity—valid; 2)Cluster—same as in the snoop request; 3) Memory Request—same as in thesnoop request; 4) MESI—Exclusive (if the data was never modified whilein cache 2080) or Modified (if the data was modified while in cache2080); and 5) Transfer Done—“not done”, except for the header connectedwith the final payload for the cache line. Cache 2080 then transfers thecontents of data ring write buffer 2395 onto data ring 2020.

Cache 2080 also provides global snoop controller 2022 with anacknowledgement that cache 2080 serviced the snoop request. In oneembodiment, cache 2080 performs the acknowledgement via thepoint-to-point link with snoop controller 2022.

If the snoop request Opcode field calls for a share operation, cache2080 performs the same as described above for a read operation with thefollowing exceptions. Cache 2080 does not necessarily relinquishownership. Cache 2080 sets the MESI field to Shared if the requestedcache line's current MESI status is Exclusive or Shared. However, if thecurrent MESI status for the requested cache line is Modified, then cache2080 sets the MESI data ring field to Modified and relinquishesownership of the cache line. Cache 2080 also provides global snoopcontroller 2022 with an acknowledgement that cache 2080 serviced thesnoop request, as described above.

If the snoop request Opcode field calls for a kill operation, cache 2080relinquishes ownership of the addressed cache line and does not transferthe line's contents onto data ring 2020. Cache 2080 also provides globalsnoop controller 2022 with an acknowledgement that cache 2080 servicedthe snoop request, as described above.

Processing Snoop Request Misses: If the snoop request is a miss, cache2080 merely provides an acknowledgement to global snoop controller 2022that cache 2080 serviced the snoop request.

Processing Fill Requests With Cluster Matches: If a Fill request has acluster match, cache 2080 retrieves the original request that led to theincoming data ring Fill request. The original request is contained ineither read ERQ 2392 or write ERQ 2394. The Memory Request field fromthe incoming data ring header identifies the corresponding entry in readERQ 2392 or write ERQ 2394. Cache 2080 employs the Address and Opcodefields from the original request in performing further processing.

If the original request's Opcode field calls for a cacheable load, cache2080 transfers the incoming data ring payload data into data array 2396and first tier return buffer 2391. In stage 2374, (FIG. 22) cache 2080selects the Fill Data, which is the payload from data ring 2020. Instage 2376, cache 2080 performs ECC generation. In stage 2378, cache2080 accesses data array 2396 and writes the Fill Data into theaddressed cache line. Cache 2080 performs the data array access based onthe Address field in the original request descriptor. As explainedabove, cache 2080 previously assigned the Address field address alocation in data array 2396 before forwarding the original request toglobal snoop controller 2022. The data array access also places the FillData into first tier return buffer 2391. Cache 2080 performs ECCchecking in stages 2378 and 2380 and loads first tier return buffer2391.

If the original request's Opcode field calls for a non-cacheable load,cache 2080 selects Fill Data in stage 2378 (FIG. 22). Cache 2080 thenforwards the Fill Data to first tier return buffer 2391 in stage 2380.First tier return buffer 2391 passes the payload data back to the firsttier cache requesting the load.

If the original request's Opcode field calls for a cacheable store,cache 2080 responds as follows in one embodiment. First, cache 2080places the Fill Data in data array 2396—cache 2080 performs the sameoperations described above for a response to a cacheable load Fillrequest. Next, cache 2080 performs a store using the data originallysupplied by the requesting compute engine—cache 2080 performs the sameoperations as described above for a response to a cacheable store firsttier request with a hit.

In an alternate embodiment, cache 2080 stores the data originallyprovided by the requesting compute engine in store buffer 2393. Cache2080 then compares the store buffer data with the Fill Data—modifyingstore buffer 2393 to include Fill Data in bit positions not targeted fornew data storage in the store request. Cache 2080 writes the contents ofstore buffer 2393 to data array 2396 when there is an idle cycle oranother access to store buffer 2393 is necessary, whichever occursfirst.

If the original request's Opcode field calls for a pre-fetch, cache 2080responds the same as for a cacheable load Fill request.

Processing Fill Requests Without Cluster Matches: If a Fill request doesnot have a cluster match, cache 2080 merely places the incoming dataring header and payload back onto data ring 2020.

Cache 2080 also manages snoop request queue 2390 and data cache requestqueues 2382, 2384, 2386, and 2388. Once a request from snoop requestqueue 2390 or data cache request queue 2382, 2384, 2386 or 2388 is sentto read ERQ 2392 or write ERQ 2394, cache 2080 invalidates the requestto make room for more requests. Once a read ERQ request or write ERQrequest is serviced, cache 2080 removes the request from the ERQ. Cache2080 removes a request by setting the request's Validity field to aninvalid status.

In one embodiment, cache 2080 also includes a sleep mode to aid in queuemanagement. Cache 2080 employs sleep mode when either read ERQ 2392 orwrite ERQ 2394 is full and cannot accept another request from a firsttier data cache request queue or snoop request queue. Instead ofrefusing service to a request or flushing the cache pipeline, cache 2080places the first tier or snoop request in a sleep mode by setting theSleep field in the request descriptor. When read ERQ 2392 or write ERQ2394 can service the request, cache 2080 removes the request from sleepmode and allows it to be reissued in the pipeline.

In another embodiment of the invention, the scheduler in cache 2080filters the order of servicing first tier data cache requests to ensurethat data is not corrupted. For example, CPU 2060 may issue a loadinstruction for a memory location, followed by a store for the samelocation. The load needs to occur first to avoid loading improper data.Due to either the CPU's pipeline or a reprioritization by cache 2080,the order of the load and store commands in the above example can becomereversed.

Processors traditionally resolve the dilemma in the above example byissuing no instructions until the load in the above example iscompleted. This solution, however, has the drawback of slowingprocessing speed—instruction cycles go by without the CPU performing anyinstructions.

In one embodiment of the present invention, the prioritization filter ofcache 2080 overcomes the drawback of the traditional processor solution.Cache 2080 allows memory requests to be reordered, but no request isallowed to precede another request upon which it is dependent. Forexample, a set of requests calls for a load from location A, a store tolocation A after the load from A, and a load from memory location B. Thestore to A is dependent on the load from A being performed first.Otherwise, the store to A corrupts the load from A. The load from A andload from B are not dependent on other instructions preceding them.Cache 2080 allows the load from A and load from B to be performed in anyorder, but the store to A is not allowed to proceed until the load fromA is complete. This allows cache 2080 to service the load from B, whilewaiting for the load from A to complete. No processing time needs to goidle.

Cache 2080 implements the prioritization filter using read ERQ 2392,write ERQ 2394, and the Dependency field in a first tier data cacherequest descriptor. The Dependency field identifies requests in thefirst tier data cache request queue that must precede the dependentrequest. Cache 2080 does not select the dependent request from the datacache request queue until all the dependent requests have been serviced.Cache 2080 recognizes a request as serviced once the request's Validityfield is set to an invalid state, as described above.

C. Global Snoop Controller

Global snoop controller 2022 responds to requests issued by clusters2012, 2014, 2016, and 2018. As demonstrated above, these requests comefrom read ERQ and write ERQ buffers in second tier caches. The requestsinstruct global snoop controller 2022 to either issue a snoop request oran access to main memory. Additionally, snoop controller 2022 convertsan own or share snoop request into a main memory access request to EBL2024 when no cluster performs a requested memory transfer. Snoopcontroller 2022 uses the above-described acknowledgements provided bythe clusters' second tier caches to keep track of memory transfersperformed by clusters.

D. Application Processing

FIG. 23 a illustrates a process employed by MPU 2010 for executingapplications in one embodiment of the present invention. FIG. 23 aillustrates a process in which MPU 2010 is employed in anapplication-based router in a communications network. Generally, anapplication-based router identifies and executes applications that needto be performed on data packets received from a communication medium.Once the applications are performed for a packet, the router determinesthe next network destination for the packet and transfers the packetover the communications medium.

MPU 2010 receives a data packet from a communications medium coupled toMPU 2010 (step 2130). In one embodiment, MPU 2010 is coupled to an IEEE802.3 compliant network running Gigabit Ethernet. In other embodiments,MPU 2010 is coupled to different networks and in some instances operatesas a component in a wide area network. A compute engine in MPU 2010,such as compute engine 2050 in FIG. 19, is responsible for receivingpackets. In such an embodiment, coprocessor 2062 includes applicationspecific circuitry coupled to the communications medium for receivingpackets. Coprocessor 2062 also includes application specific circuitryfor storing the packets in data cache 2052 and second tier cache 2080.The reception process and related coprocessor circuitry will bedescribed below in greater detail.

Compute engine 2050 transfers ownership of received packets to a flowcontrol compute engine, such as compute engine 2086, 2088, or 2090 inFIG. 19 (step 2132). Compute engine 2050 transfers packet ownership byplacing an entry in the application queue of the flow control computeengine.

The flow control compute engine forwards ownership of each packet to acompute engine in a pipeline set of compute engines (step 2134). Thepipeline set of compute engines is a set of compute engines that willcombine to perform applications required for the forwarded packet. Theflow control compute engine determines the appropriate pipeline byexamining the packet to identify the applications to be performed. Theflow control compute engine transfers ownership to a pipeline capable ofperforming the required applications.

In one embodiment of the present invention, the flow control computeengine uses the projected speed of processing applications as aconsideration in selecting a pipeline. Some packets requiresignificantly more processing than others. A limited number of pipelinesare designated to receive such packets, in order to avoid these packetsconsuming all of the MPU processing resources.

After the flow control compute engine assigns the packet to a pipeline(step 2134), a pipeline compute engine performs a required applicationfor the assigned packet (step 2136). Once the application is completed,the pipeline compute engine determines whether any applications stillneed to be performed (step 2138). If more applications remain, thepipeline compute engine forwards ownership of the packet to anothercompute engine in the pipeline (step 2134) and the above-describedprocess is repeated. This enables multiple services to be performed by asingle MPU. If no applications remain, the pipeline compute engineforwards ownership of the packet to a transmit compute engine (step2140).

The transmit compute engine transmits the data packet to a newdestination of the network, via the communications medium (step 2142).In one such embodiment, the transmit compute engine includes acoprocessor with application specific circuitry for transmittingpackets. The coprocessor also includes application specific circuitryfor retrieving the packets from memory. The transmission process andrelated coprocessor circuitry will be described below in greater detail.

FIG. 23 b illustrates a process for executing applications in analternate embodiment of the present invention. This embodiment employsmultiple multi-processor units, such as MPU 2010. In this embodiment,the multi-processor units are coupled together over a communicationsmedium. In one version, the multi-processor units are coupled togetherby cross-bar switches, such as cross-bar switches 3010 and 3110described below with reference to FIGS. 36-45.

In the embodiment shown in FIG. 23 b, steps with the same referencenumbers as steps in FIG. 23 a operate as described for FIG. 23 a. Thedifference is that packets are assigned to a pipeline set ofmulti-processor units, instead of a pipeline set of compute engines.Each multi-processor unit in a pipeline transfers packets to the nextmulti-processor unit in the pipeline via the communications medium (step2133). In one such embodiment, each multi-processor unit has a computeengine coprocessor with specialized circuitry for performingcommunications medium receptions and transmissions, as well asexchanging data with cache memory. In one version of the FIG. 23 bprocess, each multi-processor unit performs a dedicated application. Inalternate embodiments, a multi-processor unit performs multipleapplications.

E. Coprocessor

As described above, MPU 2010 employs coprocessors in cluster computeengines to expedite application processing. The following sets forthcoprocessor implementations employed in one set of embodiments of thepresent invention. One of ordinary skill will recognize that alternatecoprocessor implementations can also be employed in an MPU in accordancewith the present invention.

1. Coprocessor Architecture and Operation

FIG. 24 a illustrates a coprocessor in one embodiment of the presentinvention, such as coprocessor 2062 from FIGS. 18 and 19. Coprocessor2062 includes sequencers 2150 and 2152, each coupled to CPU 2060,arbiter 2176, and a set of application engines. The application enginescoupled to sequencer 2150 include streaming input engine 2154, streamingoutput engine 2162, and other application engines 2156, 2158, and 2160.The application engines coupled to sequencer 2152 include streaminginput engine 2164, streaming output engine 2172, and other applicationengines 2166, 2168, and 2170. In alternate embodiments any number ofapplication engines are coupled to sequencers 2150 and 2152.

Sequencers 2150 and 2152 direct the operation of their respectivecoupled engines in response to instructions received from CPU 2060. Inone embodiment, sequencers 2150 and 2152 are micro-code basedsequencers, executing micro-code routines in response to instructionsfrom CPU 2060. Sequencers 2150 and 2152 provide output signals andinstructions that control their respectively coupled engines in responseto these routines. Sequencers 2150 and 2152 also respond to signals anddata provided by their respectively coupled engines. Sequencers 2150 and2152 additionally perform application processing internally in responseto CPU 2060 instructions.

Streaming input engines 2154 and 2164 each couple coprocessor 2062 todata cache 2052 for retrieving data. Streaming output engines 2162 and2172 each couple coprocessor 2062 to data cache 2052 for storing data tomemory. Arbiter 2176 couples streaming input engines 2154 and 2164, andstreaming output engines 2162 and 2172, and sequencers 2150 and 2152 todata cache 2052. In one embodiment, arbiter 2176 receives andmultiplexes the data paths for the entities on coprocessor 2062. Arbiter2176 ensures that only one entity at a time receives access to theinterface lines between coprocessor 62 and data cache 2051. MMU 2174 iscoupled to arbiter 2176 to provide internal conversions between virtualand physical addresses. In one embodiment of the present invention,arbiter 2176 performs a round-robin arbitration scheme. Mirco-MMU 2174contains the above-referenced internal translation buffers forcoprocessor 2062 and provides coprocessor 2062's interface to MMU 2058(FIG. 18) or 2082 (FIG. 19).

Application engines 2156, 2158, 2160, 2166, 2168, and 2170 each performa data processing application relevant to the job being performed by MPU2010. For example, when MPU 2010 is employed in one embodiment as anapplication based router, application engines 2156, 2158, 2160, 2166,2168, and 2170 each perform one of the following: 1) data string copies;2) polynomial hashing; 3) pattern searching; 4) RSA moduloexponentiation; 5) receiving data packets from a communications medium;6) transmitting data packets onto a communications medium; and 7) dataencryption and decryption.

Application engines 2156, 2158, and 2160 are coupled to provide data tostreaming output engine 2162 and receive data from streaming inputengine 2154. Application engines 2166, 2168, and 2170 are coupled toprovide data to streaming output engine 2172 and receive data fromstreaming input engine 2164.

FIG. 24 b shows an embodiment of coprocessor 2062 with applicationengines 2156 and 2166 designed to perform the data string copyapplication. In this embodiment, engines 2156 and 2166 are coupled toprovide string copy output data to engine sets 2158, 2160, and 2162, and2168, 2170, and 2172, respectively. FIG. 24 c shows an embodiment ofcoprocessor 2062, where engine 2160 is a transmission media accesscontroller (“TxMAC”) and engine 2170 is a reception media accesscontroller (RxMAC”). TxMAC 2160 transmits packets onto a communicationsmedium, and RxMAC 2170 receives packets from a communications medium.These two engines will be described in greater detail below.

One advantage of the embodiment of coprocessor 2062 shown in FIGS. 24a-24 c is the modularity. Coprocessor 2062 can easily be customized toaccommodate many different applications. For example, in one embodimentonly one compute engine receives and transmits network packets. In thiscase, only one coprocessor contains an RxMAC and TxMAC, while othercoprocessors in MPU 2010 are customized with different data processingapplications. Coprocessor 2062 supports modularity by providing auniform interface to application engines, except streaming input engines2154 and 2164 and streaming output engines 2162 and 2172.

2. Sequencer

FIG. 25 shows an interface between CPU 2060 and sequencers 2150 and 2152in coprocessor 2062 in one embodiment of the present invention. CPU 2060communicates with sequencer 2150 and 2152 through data registers 2180and 2184, respectively, and control registers 2182 and 2186,respectively. CPU 2060 has address lines and data lines coupled to theabove-listed registers. Data registers 2180 and control registers 2182are each coupled to exchange information with micro-code engine andlogic block 2188. Block 2188 interfaces to the engines in coprocessor2062. Data register 2184 and control registers 2186 are each coupled toexchange information with micro-code engine and logic block 2190. Block2190 interfaces to the engines in coprocessor 2062.

CPU 2060 is coupled to exchange the following signals with sequencers2150 and 2152: 1) Interrupt (INT)—outputs from sequencers 2150 and 2152indicating an assigned application is complete; 2) Read Allowed—outputsfrom sequencers 2150 and 2152 indicating access to data and controlregisters is permissible; 3) Running—outputs from sequencers 2150 and2152 indicating that an assigned application is complete; 4)Start—outputs from CPU 2060 indicating that sequencer operation is tobegin; and 5) Opcode—outputs from CPU 2060 identifying the set ofmicro-code instructions for the sequencer to execute after the assertionof Start.

In operation, CPU 2060 offloads performance of assigned applications tocoprocessor 2062. CPU 2060 instructs sequencers 2150 and 2152 by writinginstructions and data into respective data registers 2180 and 2182 andcontrol registers 2184 and 2186. The instructions forwarded by CPU 2060prompt either sequencer 2150 or sequencer 2152 to begin executing aroutine in the sequencer's micro-code. The executing sequencer eitherperforms the application by running a micro-code routine or instructingan application engine to perform the offloaded application. While theapplication is running, the sequencer asserts the Running signal, andwhen the application is done the sequencer asserts the Interrupt signal.This allows CPU 2060 to detect and respond to an application'scompletion either by polling the Running signal or employing interruptservice routines.

FIG. 26 shows an interface between sequencer 2150 and its relatedapplication engines in one embodiment of the present invention. The sameinterface is employed for sequencer 2152.

Output data interface 2200 and input data interface 2202 of sequencer2150 are coupled to engines 2156, 2158, and 2160. Output data interface2200 provides data to engines 2156, 2158, and 2160, and input datainterface 2202 retrieves data from engines 2156, 2158, and 2160. In oneembodiment, data interfaces 2200 and 2202 are each 32 bits wide.

Sequencer 2150 provides enable output 2204 to engines 2156, 2158, and2160. Enable output 2204 indicates which application block is activated.In one embodiment of the present invention, sequencer 2150 onlyactivates one application engine at a time. In such an embodiment,application engines 2156, 2158, and 2160 each receive a single bit ofenable output 2204—assertion of that bit indicates the receivingapplication engine is activated. In alternate embodiments, multipleapplication engines are activated at the same time.

Sequencer 2150 also includes control interface 2206 coupled toapplication engines 2156, 2158, and 2160. Control interface 2206 managesthe exchange of data between sequencer 2150 and application engines2156, 2158, and 2160. Control interface 2206 supplies the followingsignals:

1) register read enable—enabling data and control registers on theactivated application engine to supply data on input data interface2202;2) register write enable—enabling data and control registers on theactivated application engine to accept data on output data interface2200;3) register address lines—providing addresses to application engineregisters in conjunction with the data and control register enablesignals; and4) arbitrary control signals—providing unique interface signals for eachapplication engine. The sequencer's micro-code programs the arbitrarycontrol bits to operate differently with each application engine tosatisfy each engine's unique interface needs.

Once sequencer 2150 receives instruction from CPU 2060 to carry out anapplication, sequencer 2150 begins executing the micro-code routinesupporting that application. In some instances, the micro-codeinstructions carry out the application without using any applicationengines. In other instances, the micro-code instructions cause sequencer2150 to employ one or more application engines to carry out anapplication.

When sequencer 2150 employs an application engine, the micro-codeinstructions cause sequencer 2150 to issue an enable signal to theengine on enable interface 2204. Following the enable signal, themicro-code directs sequencer 2150 to use control interface 2206 toinitialize and direct the operation of the application engine. Sequencer2150 provides control directions by writing the application engine'scontrol registers and provides necessary data by writing the applicationengine's data registers. The micro-code also instructs sequencer 2150 toretrieve application data from the application engine. An example of thesequencer-application interface will be presented below in thedescription of RxMAC 2170 and TxMAC 2160.

Sequencer 2150 also includes a streaming input (SI) engine interface2208 and streaming output (SO) engine interface 2212. These interfacescouple sequencer 2150 to streaming input engine 2154 and streamingoutput engine 2162. The operation of these interfaces will be explainedin greater detain below.

Streaming input data bus 2210 is coupled to sequencer 2150, streaminginput engine 2154, and application engines 2156, 2158, and 2160.Streaming input engine 2154 drives bus 2210 after retrieving data frommemory. In one embodiment, bus 2210 is 16 bytes wide. In one suchembodiment, sequencer 2150 is coupled to retrieve only 4 bytes of databus 2210.

Streaming output bus 2211 is coupled to sequencer 2150, streaming outputengine 2162 and application engines 2156, 2158, and 2160. Applicationengines deliver data to streaming output engine 2162 over streamingoutput bus 2211, so streaming output engine 2162 can buffer the data tomemory. In one embodiment, bus 2211 is 16 bytes wide. In one suchembodiment, sequencer 2150 only drives 4 bytes on data bus 2211.

3. Streaming Input Engine

FIG. 27 shows streaming input engine 2154 in one embodiment of thepresent invention. Streaming input engine 2154 retrieves data frommemory in MPU 2010 at the direction of sequencer 2150. Sequencer 2150provides streaming input engine 2154 with a start address and data sizevalue for the block of memory to be retrieved. Streaming input engine2154 responds by retrieving the identified block of memory and providingit on streaming data bus 2210 in coprocessor 2062. Streaming inputengine 2154 provides data in programmable word sizes on bus 2210, inresponse to signals on SI control interface 2208.

Fetch and pre-fetch engine 2226 provides instructions (Memory Opcode)and addresses for retrieving data from memory. Alignment circuit 2228receives the addressed data and converts the format of the data into thealignment desired on streaming data bus 2210. In one embodiment, engine2226 and alignment circuit 2228 are coupled to first tier data cache2052 through arbiter 2176 (FIGS. 24 a-24 c).

Alignment circuit 2228 provides the realigned data to register 2230,which forwards the data to data bus 2210. Mask register 2232 provides amask value identifying the output bytes of register 2230 that are valid.In one embodiment, fetch engine 2226 addresses 16 byte words in memory,and streaming input engine 2154 can be programmed to provide words withsizes of either: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 16 bytes.

Streaming input engine 2154 includes configuration registers 2220, 2222,and 2224 for receiving configuration data from sequencer 2150. Registers2220, 2222, and 2224 are coupled to data signals on SI control interface2208 to receive a start address, data size, and mode identifier,respectively. Registers 2220, 2222, and 2224 are also coupled to receivethe following control strobes from sequencer 2150 via SI controlinterface 2208: 1) start address strobe—coupled to start addressregister 2220; 2) data size strobe—coupled to data size register 2222;and 3) mode strobe—coupled to mode register 2224. Registers 2220, 2222,and 2224 each capture the data on output data interface 2200 whensequencer 2150 asserts their respective strobes.

In operation, fetch engine 2226 fetches the number of bytes identifiedin data size register 2222, beginning at the start address in register2220. In one embodiment, fetch engine 2226 includes a pre-fetchoperation to increase the efficiency of memory fetches. Fetch engine2226 issues pre-fetch instructions prior to addressing memory. Inresponse to the pre-fetch instructions, MPU 2010 begins the process ofmapping the memory block being accessed by fetch engine 2226 into datacache 2052 (See FIGS. 18 and 19).

In one embodiment, fetch engine 2226 calls for MPU 2010 to pre-fetch thefirst three 64 byte cache lines of the desired memory block. Next, fetchengine 2226 issues load instructions for the first 64 byte cache line ofthe desired memory block. Before each subsequent load instruction forthe desired memory block, fetch engine 2226 issues pre-fetchinstructions for the two cache lines following the previouslypre-fetched lines. If the desired memory block is less than three cachelines, fetch engine 2226 only issues pre-fetch instructions for thenumber of lines being sought. Ideally, the pre-fetch operations willresult in data being available in data cache 2052 when fetch engine 2226issues load instructions.

SI control interface 2208 includes the following additional signals: 1)abort—asserted by sequencer 2150 to halt a memory retrieval operation;2) start—asserted by sequencer 2150 to begin a memory retrievaloperations; 3) done—asserted by streaming input engine 2154 when thestreaming input engine is drained of all valid data; 4) DataValid—asserted by streaming input engine 2154 to indicate engine 2154 isproviding valid data on data bus 2210; 5) 16 Byte Size &Advance—asserted by sequencer 2150 to call for a 16 byte data output ondata bus 210; and 6) 9 Byte Size & Advance—asserted by sequencer 2150 tocall for either 0, 1, 2, 3, 4, 5, 6, 7, or 8 byte data output on databus 2210.

In one embodiment, alignment circuit 2228 includes buffer 2234, byteselector 2238, register 2236, and shifter 2240. Buffer 2234 is coupledto receive 16 byte data words from data cache 2052 through arbiter 2176.Buffer 2234 supplies data words on its output in the order the datawords were received. Register 2236 is coupled to receive 16 byte datawords from buffer 2234. Register 2236 stores the data word that residedon the output of buffer 2234 prior to the word stored in register 2236.

Byte selector 2238 is coupled to receive the data word stored inregister 2236 and the data word on the output of buffer 2234. Byteselector 2238 converts the 32 byte input into a 24 byte output, which iscoupled to shifter 2240. The 24 bytes follow the byte last provided toregister 2230. Register 2236 loads the output of buffer 2234 and buffer2234 outputs the next 16 bytes, when the 24 bytes extends beyond themost significant byte on the output of buffer 2234. Shifter 2240 shiftsthe 24 byte input, so the next set of bytes to be supplied on data bus2210 appear on the least significant bytes of the output of shifter2240. The output of shifter 2240 is coupled to register 2230, whichtransfers the output of shifter 2240 onto data bus 2210.

Shifter 2240 is coupled to supply the contents of mask 2232 and receivethe 9 Byte Size & Advance signal. The 9 Byte Size & Advance signalindicates the number of bytes to provide in register 2230 for transferonto streaming data bus 2210. The 9 Byte Size & Advance signal covers arange of 0 to 8 bytes. When the advance bit of the signal is deasserted,the entire signal is ignored. Using the contents of the 9 Byte Size &Advance signal, shifter 2240 properly aligns data in register 2230 sothe desired number of bytes for the next data transfer appear inregister 2230 starting at the least significant byte.

The 16 Byte Size & Advance signal is coupled to buffer 2234 and byteselector 2238 to indicate that a 16 byte transfer is required on databus 2210. In response to this signal, buffer 2234 immediately outputsthe next 16 bytes, and register 2236 latches the bytes previously on theoutput of buffer 2234. When the advance bit of the signal is deasserted,the entire signal is ignored.

In one embodiment, mode register 2224 stores two mode bits. The firstbit controls the assertion of the data valid signal. If the first bit isset, streaming input engine 2154 asserts the data valid signal oncethere is valid data in buffer 2234. If the first bit is not set,streaming input engine 2154 waits until buffer 2234 contains at least 32valid bytes before asserting data valid. The second bit controls thedeassertion of the data valid signal. When the second bit is set, engine2154 deasserts data valid when the last byte of data leaves buffer 2234.Otherwise, engine 2154 deasserts data valid when buffer 2234 containsless than 16 valid data bytes.

4. Streaming Output Engine

FIG. 28 illustrates one embodiment of streaming output engine 2162 incoprocessor 2062. Streaming output engine 2162 receives data fromstreaming data bus 2211 and stores the data in memory in MPU 2010.Streaming data bus 2211 provides data to alignment block 2258 and masksignals to mask register 2260. The mask signals identify the bytes onstreaming data bus 2211 that are valid. Alignment block 2258 arrangesthe incoming data into its proper position in a 16 byte aligned dataword. Alignment block 2258 is coupled to buffer 2256 to provide theproperly aligned data.

Buffer 2256 maintains the resulting 16 byte data words until they arewritten into memory over a data line output of buffer 2256, which iscoupled to data cache 2052 via arbiter 2176. Storage engine 2254addresses memory in MPU 2010 and provides data storage opcodes over itsaddress and memory opcode outputs. The address and opcode outputs ofstorage engine 2254 are coupled to data cache 2052 via arbiter 2176. Inone embodiment, storage engine 2254 issues 16 byte aligned data storageoperations.

Streaming output buffer 2162 includes configuration registers 2250 and2252. Registers 2250 and 2252 are coupled to receive data from sequencer2150 on data signals in SO control interface 2212. Register 2250 iscoupled to a start address strobe provided by sequencer 2150 on SOcontrol interface 2212. Register 2250 latches the start address datapresented on interface 2212 when sequencer 2150 asserts the startaddress strobe. Register 2252 is coupled to a mode address strobeprovided by sequencer 2150 on SO control bus 2212. Register 2252 latchesthe mode data presented on interface 2212 when sequencer 2150 assertsthe mode strobe.

In one embodiment, mode configuration register 2252 contains 2 bits. Afirst bit controls a cache line burst mode. When this bit is asserted,streaming output engine 2162 waits for a full cache line word toaccumulate in engine 2162 before storing data to memory. When the firstbit is not asserted, streaming output engine 2162 waits for at least 16bytes to accumulate in engine 2162 before storing data to memory.

The second bit controls assertion of the store-create instruction bycoprocessor 2062. If the store-create mode bit is not asserted, thencoprocessor 2062 doesn't assert the store-create opcode. If thestore-create bit is asserted, storage engine 2254 issues thestore-create opcode under the following conditions: 1) If cache lineburst mode is enabled, streaming output engine 2162 is storing the first16 bytes of a cache line, and engine 2162 has data for the entire cacheline; and 2) If cache line burst mode is not enabled, streaming outputengine 2162 is storing the first 16 bytes of a cache line, and engine2162 has 16 bytes of data for the cache line.

SO control interface 2212 includes the following additional signals: 1)Done—asserted by sequencer 2150 to instruct streaming output engine 2162that no more data is being provided on data bus 2210; 2) Abort—providedby sequencer 2150 to instruct streaming output engine 2162 to flushbuffer 2256 and cease issuing store opcodes; 3) Busy—supplied bystreaming output engine 2162 to indicate there is data in buffer 2256 tobe transferred to memory; 4) Align Opcode & Advance—supplied bysequencer 2150 to identify the number of bytes transferred in a singledata transfer on data bus 2211. The align opcode can identify 4, 8 or 16byte transfers in one embodiment. When the advance bit is deasserted,the align opcode is ignored by streaming output engine 2162; and 5)Stall—supplied by streaming output engine 2162 to indicate buffer 2256is full. In response to receiving the Stall signal, sequencer 2150stalls data transfers to engine 2162.

Alignment block 2258 aligns incoming data from streaming data bus 2211in response to the alignment opcode and start address register value.FIG. 29 shows internal circuitry for buffer 2256 and alignment block2258 in one embodiment of the invention. Buffer 2256 supplies a 16 bytealigned word from register 2262 to memory on the output data line formedby the outputs of register 2262. Buffer 2256 internally maintains 4buffers, each storing 4 byte data words received from alignment block2256. Data buffer 2270 is coupled to output word register 2262 toprovide the least significant 4 bytes (0-3). Data buffer 2268 is coupledto output word register 2262 to provide bytes 4-7. Data buffer 2266 iscoupled to output word register 2262 to provide bytes 8-11. Data buffer2264 is coupled to output word register 2262 to provide the mostsignificant bytes (12-15).

Alignment block 2258 includes multiplexers 2272, 2274, 2276, and 2278 toroute data from streaming data bus 2211 to buffers 2264, 2266, 2268, and2270. Data outputs from multiplexers 2272, 2274, 2276, and 2278 arecoupled to provide data to the inputs of buffers 2264, 2266, 2268, and2270, respectively. Each multiplexer includes four data inputs. Eachinput is coupled to a different 4 byte segment of streaming data bus2211. A first multiplexer data input receives bytes 0-3 of data bus2211. A second multiplexer data input receives bytes 4-7 of data bus2211. A third multiplexer input receives bytes 8-11 of data bus 2211. Afourth multiplexer data input receives bytes 12-15 of data bus 2211.

Each multiplexer also includes a set of select signals, which are drivenby select logic 2280. Select logic 2280 sets the select signals formultiplexers 2272, 2274, 2276, and 2278, based on the start address inregister 2252 and the Align Opcode & Advance Signal. Select logic 280ensures that data from streaming data bus 2211 is properly aligned inoutput word register 2262.

For example, the start address may start at byte 4, and the Align Opcodecalls for 4 byte transfers on streaming data bus 2211. The first 12bytes of data received from streaming data bus 2211 must appear in bytes4-15 of output register 2262.

When alignment block 2258 receives the first 4 byte transfer on bytes0-3 of bus 2211, select logic 2280 enables multiplexer 2276 to passthese bytes to buffer 2268. When alignment block 2258 receives thesecond 4 byte transfer, also appearing on bytes 0-3 of bus 2211, selectlogic 2280 enables multiplexer 2274 to pass bytes 0-3 to buffer 2266.When alignment block 2258 receives the third 4 byte transfer, alsoappearing on bytes 0-3 of bus 2211, select logic 2280 enablesmultiplexer 2272 to pass bytes 0-3 to buffer 2264. As a result, whenbuffer 2256 performs its 16 byte aligned store to memory, the twelvebytes received from data bus 2211 appear in bytes 4-15 of the storedword.

In another example, the start address starts at byte 12, and the AlignOpcode calls for 8 byte transfers on streaming data bus 2211. Alignmentblock 2258 receives the first 8 byte transfer on bytes 0-7 of bus 2211.Select logic 2080 enables multiplexer 2272 to pass bytes 0-3 of bus 2211to buffer 2264 and enables multiplexer 2278 to pass bytes 4-7 of bus2211 to buffer 2270. Alignment block 2258 receives the second 8 bytetransfer on bytes 0-7 of bus 2211. Select logic 2080 enables multiplexer2276 to pass bytes 0-3 of bus 2211 to buffer 2268 and enablesmultiplexer 2274 to pass bytes 4-7 of bus 2211 to buffer 2266. Register2262 transfers the newly recorded 16 bytes to memory in 2 transfers. Thefirst transfer presents the least significant 4 bytes of the newlyreceived 16 byte transfer in bytes 12-15. The second transfer presents12 bytes of the newly received data on bytes 0-11.

One of ordinary skill will recognize that FIG. 29 only shows onepossible embodiment of buffer 2256 and alignment block 2258. Otherembodiments are possible using well known circuitry to achieve theabove-described functionality.

5. RxMAC and Packet Reception

a. RxMAC

FIG. 30 illustrates one embodiment of RxMAC 2170 in accordance with thepresent invention. RxMAC 2170 receives data from a network and forwardsit to streaming output engine 2162 for storing in MPU 2010 memory. Thecombination of RxMAC 2170 and streaming output engine 2162 enables MPU2010 to directly write network data to cache memory, without first beingstored in main memory 2026.

RxMAC 2170 includes media access controller (“MAC”) 2290, buffer 2291,and sequencer interface 2292. In operation, MAC 290 is coupled to acommunications medium through a physical layer device (not shown) toreceive network data, such as data packets. MAC 2290 performs the mediaaccess controller operations required by the network protocol governingdata transfers on the coupled communications medium. Example of MACoperations include: 1) framing incoming data packets; 2) filteringincoming packets based on destination addresses; 3) evaluating FrameCheck Sequence (“FCS”) checksums; and 4) detecting packet receptionerrors.

In one embodiment, MAC 2290 conforms to the IEEE 802.3 Standard for acommunications network supporting GMII Gigabit Ethernet. In one suchembodiment, the MAC 2290 network interface includes the followingsignals from the IEEE 802.3z Standard: 1) RXD—an input to MAC 2290providing 8 bits of received data; 2) RX_DV—an input to MAC 2290indicating RXD is valid; 3) RX_ER—an input to MAC 2290 indicating anerror in RXD; and 4) RX_CLK—an input to MAC 2290 providing a 125 MHzclock for timing reference for RXD.

One of ordinary skill will recognize that in alternate embodiments ofthe present invention MAC 2290 includes interfaces to physical layerdevices conforming to different network standards. One such standard isthe IEEE 802.3 standard for MII 100 megabit per second Ethernet.

In one embodiment of the invention, RxMAC 2170 also receives and framesdata packets from a point-to-point link with a device that couples MPUstogether. Two such devices are cross-bar switch 3010 and cross-barswitch 3110 described below with reference to FIGS. 36-45. In one suchembodiment, the point-to-point link includes signaling that conforms tothe IEEE 802.3 Standard for GMII Gigabit Ethernet MAC interfaceoperation.

MAC 2290 is coupled to buffer 2291 to provide framed words (MAC Data)from received data packets. In one embodiment, each word contains 8bits, while in other embodiments alternate size words can be employed.Buffer 2291 stores a predetermined number of framed words, thentransfers the words to streaming data bus 2211. Streaming output engine2162 stores the transferred data in memory, as will be described belowin greater detail. In one such embodiment, buffer 2291 is afirst-in-first-out (“FIFO”) buffer.

As listed above, MAC 2290 monitors incoming data packets for errors. Inone embodiment, MAC 2290 provides indications of whether the followingoccurred for each packet: 1) FCS error; 2) address mismatch; 3) sizeviolation; 4) overflow of buffer 2291; and 5) RX_ER signal asserted. Inone such embodiment, this information is stored in memory in MPU 2010,along with the associated data packet.

RxMAC 2170 communicates with sequencer 2150 through sequencer interface2292. Sequencer interface 2292 is coupled to receive data on sequenceroutput data bus 2200 and provide data on sequencer input data bus 2202.Sequencer interface 2292 is coupled to receive a signal from enableinterface 2204 to inform RxMAC 2170 whether it is activated.

Sequencer 2150 programs RxMAC 2170 for operation through controlregisters (not shown) in sequencer interface 2292. Sequencer 2150 alsoretrieves control information about RxMAC 2170 by querying registers insequencer interface 2292. Sequencer interface 2292 is coupled to MAC2290 and buffer 2291 to provide and collect control registerinformation.

Control registers in sequencer interface 2292 are coupled to sequencerinput data bus 2202 and output data bus 2200. The registers are alsocoupled to sequencer control bus 2206 to provide for addressing andcontrolling register store and load operations. Sequencer 2150 writesone of the control registers to define the mode of operation for RxMAC2170. In one mode, RxMAC 2170 is programmed for connection to acommunications network and in another mode RxMAC 2170 is programmed tothe above-described point-to-point link to another device. Sequencer2150 employs another set of control registers to indicate thedestination addresses for packets that RxMAC 2170 is to accept.

Sequencer interface 2292 provides the following signals in controlregisters that are accessed by sequencer 2150: 1) End ofPacket—indicating the last word for a packet has left buffer 2291; 2)Bundle Ready—indicating buffer 2291 has accumulated a predeterminednumber of bytes for transfer on streaming data bus 2210; 3)Abort—indicating an error condition has been detected, such as anaddress mismatch, FCS error, or buffer overflow; and 4)Interrupt—indicating sequencer 2150 should execute an interrupt serviceroutine, typically for responding to MAC 2290 losing link to thecommunications medium. Sequencer interface 2292 is coupled to MAC 2290and buffer 2291 to receive the information necessary for controlling theabove-described signals.

Sequencer 2150 receives the above-identified signals in response tocontrol register reads that access control registers containing thesignals. In one embodiment, a single one bit register provides all thecontrol signals in response to a series of register reads by sequencer2150. In an alternate embodiment, the control signals are provided oncontrol interface 2206. Sequencer 2150 responds to the control signalsby executing operations that correspond to the signals—this will bedescribed in greater detail below. In one embodiment, sequencer 2150executes corresponding micro-code routines in response to the signals.Once sequencer 2150 receives and responds to one of the above-describedsignals, sequencer 2150 performs a write operation to a control registerin sequencer interface 2292 to deassert the signal.

b. Packet Reception

FIG. 31 illustrates a process for receiving data packets usingcoprocessor 2062 in one embodiment of the present invention. CPU 2060initializes sequencer 2152 for managing packet receptions (step 300).CPU 2060 provides sequencer 2150 with addresses in MPU memory forcoprocessor 2062 to store data packets. One data storage scheme for usewith the present invention appears in detail below.

After being initialized by CPU 2060, sequencer 2152 initializes RxMAC2170 (step 2301) and streaming output engine 2172 (step 2302). CPU 2060provides RxMAC 2170 with an operating mode for MAC 2290 and thedestination addresses for data packets to be received. CPU 2060 providesstreaming output engine 2172 with a start address and operating modes.The starting address is the memory location where streaming outputengine 2172 begins storing the next incoming packet. In one embodiment,sequencer 2152 sets the operating modes as follows: 1) the cache lineburst mode bit is not asserted; and 2) the store-create mode bit isasserted. As described above, initializing streaming output engine 2172causes it to begin memory store operations.

Once initialization is complete, sequencer 2152 determines whether dataneeds to be transferred out of RxMAC 2170 (step 2304). Sequencer 2152monitors the bundle ready signal to make this determination. Once RxMAC2170 asserts bundle ready, bytes from buffer 2291 in RxMAC 2170 aretransferred to streaming output engine 2172 (step 2306).

Upon detecting the bundle ready signal (step 2304), sequencer 2152issues a store opcode to streaming output engine 2172. Streaming outputengine 2172 responds by collecting bytes from buffer 2291 on streamingdata bus 2211 (step 2306). In one embodiment, buffer 2291 places 8 bytesof data on the upper 8 bytes of streaming data bus 2211, and the opcodecauses engine 2172 to accept these bytes. Streaming output engine 2172operates as described above to transfer the packet data to cache memory2052 (step 2306).

Sequencer 2152 also resets the bundle ready signal (step 2308).Sequencer 2152 resets the bundle ready signal, so the signal can beemployed again once buffer 2291 accumulates a sufficient number ofbytes. Sequencer 2152 clears the bundle ready signal by performing astore operation to a control register in sequencer interface 2292 inRxMAC 2170.

Next, sequencer 2152 determines whether bytes remain to be transferredout of RxMAC 2170 (step 2310). Sequencer 2152 makes this determinationby monitoring the end of packet signal from RxMAC 2170. If RxMAC 2170has not asserted the end of packet signal, sequencer 2152 beginsmonitoring the bundle ready signal again (step 2304). If RxMAC 2170 hasasserted the end of packet signal (step 2310), sequencer 2152 issues thedone signal to streaming output engine 2172 (step 2314).

Once the done signal is issued, sequencer 2152 examines the abort signalin RxMAC 2170 (step 2309). If the abort signal is asserted, sequencer2152 performs an abort operation (step 2313). After performing the abortoperation, sequencer 2152 examines the interrupt signal in RxMAC 2170(step 2314). If the interrupt signal is set, sequencer 2152 executes aresponsive interrupt service routine (“ISR”) (step 2317). After the ISRor if the interrupt is not set, sequencer 2152 returns to initialize thestreaming output engine for another reception (step 2302).

If the abort signal was not set (step 2309), sequencer 2152 waits forstreaming output engine 2172 to deassert the busy signal (step 2316).After sensing the busy signal is deasserted, sequencer 2152 examines theinterrupt signal in RxMAC 2170 (step 2311). If the interrupt isasserted, sequencer 2152 performs a responsive ISR (step 2315). Afterthe responsive ISR or if the interrupt was not asserted, sequencer 2152performs a descriptor operation (step 2318). As part of the descriptoroperation, sequencer 2152 retrieves status information from sequencerinterface 2292 in RxMAC 2170 and writes the status to a descriptor fieldcorresponding to the received packet, as will be described below.Sequencer 2152 also determines the address for the next receive packetand writes this value in a next address descriptor field. Once thedescriptor operation is complete, sequencer 2152 initializes streamingoutput engine 2172 (step 2302) as described above. This enables MPU 2010to receive another packet into memory.

FIG. 32 provides a logical representation of one data management schemefor use in embodiments of the present invention. During sequencerinitialization (step 2300), the data structure shown in FIG. 32 isestablished. The data structure includes entries 2360, 2362, 2364, and2366, which are mapped into MPU 2010 memory. Each entry includes Nblocks of bytes. Sequencer 2152 maintains corresponding ownershipregisters 2368, 2370, 2372, and 2374 for identifying ownership ofentries 2360, 2362, 2364, and 2366, respectively.

In one embodiment, each entry includes 32 blocks, and each blockincludes 512 bytes. In one such embodiment, blocks 0 through N−1 arecontiguous in memory and entries 2360, 2362, 2364, and 2366 arecontiguous in memory.

Streaming output engine 2172 stores data received from RxMAC 2170 inentries 2360, 2362, 2364, and 2366. CPU 2060 retrieves the receivedpackets from these entries. As described with reference to FIG. 31,sequencer 2152 instructs streaming output engine 2172 where to storereceived data (step 2302). Sequencer 2152 provides streaming inputengine 2172 with a start address offset from the beginning of a block inan entry owned by sequencer 2152. In one embodiment, the offset includesthe following fields: 1) Descriptor—for storing status informationregarding the received packet; and 2) Next Packet Pointer—for storing apointer to the block that holds the next packet. In some instancesreserved bytes are included after the Next Packet Pointer.

As described with reference to FIG. 31, sequencer 2152 performs adescriptor operation (step 2318) to write the Descriptor and Next PacketPointer fields. Sequencer 2152 identifies the Next Packet Pointer bycounting the number of bytes received by RxMAC 2170. This is achieved inone embodiment by counting the number of bundle ready signals (step2304) received for a packet. In one embodiment, sequencer 152 ensuresthat the Next Packet Pointer points to the first memory location in ablock. Sequencer 2152 retrieves information for the Descriptor fieldfrom sequencer interface 2292 in RxMAC 2170 (FIG. 30).

In one embodiment, the Descriptor field includes the following: 1) FrameLength—indicating the length of the received packet; 2) FrameDone—indicating the packet has been completed; 3) BroadcastFrame—indicating whether the packet has a broadcast address; 4)Multicast Frame—indicating whether the packet is a multicast packetsupported by RxMAC 2170; 5) Address Match—indicating whether an addressmatch occurred for the packet; 6) Frame Error—indicating whether thepacket had a reception error; and 7) Frame Error Type—indicating thetype of frame error, if any. In other embodiments, additional anddifferent status information is included in the Descriptor field.

Streaming output engine 2172 stores incoming packet data into as manycontiguous blocks as necessary. If the entry being used runs out ofblocks, streaming output engine 2172 buffers data into the first blockof the next entry, provided sequencer 2152 owns the entry. One exceptionto this operation is that streaming output engine 2172 will not split apacket between entry 2366 and 2360.

In one embodiment, 256 bytes immediately following a packet are leftunused. In this embodiment, sequencer 2152 skips a block in assigningthe next start address (step 2318 and step 2302) if the last block of apacket has less than 256 bytes unused.

After initialization (step 2300), sequencer 2152 possesses ownership ofentries 2360, 2362, 2364, and 2366. After streaming output engine 2172fills an entry, sequencer 2152 changes the value in the entry'scorresponding ownership register to pass ownership of the entry to CPU2060. Once CPU 2060 retrieves the data in an entry, CPU 2060 writes theentry's corresponding ownership register to transfer entry ownership tosequencer 2152. After entry 2366 is filled, sequencer 2152 waits forownership of entry 360 to be returned before storing any more packets.

6. TxMAC and Packet Transmission

a. TxMAC

FIG. 33 illustrates one embodiment of TxMAC 2160 in accordance with thepresent invention. TxMAC 2160 transfers data from MPU 2010 to a networkinterface for transmission onto a communications medium. TxMAC 2160operates in conjunction with streaming input engine 2154 to directlytransfer data from cache memory to a network interface, without firstbeing stored in main memory 2026.

TxMAC 2160 includes media access controller (“MAC”) 2320, buffer 2322,and sequencer interface 2324. In operation, MAC 2320 is coupled to acommunications medium through a physical layer device (not shown) totransmit network data, such as data packets. As with MAC 2290, MAC 2320performs the media access controller operations required by the networkprotocol governing data transfers on the coupled communications medium.Example of MAC transmit operations include, 1) serializing outgoing datapackets; 2) applying FCS checksums; and 3) detecting packet transmissionerrors.

In one embodiment, MAC 2320 conforms to the IEEE 802.3 Standard for acommunications network supporting GMII Gigabit Ethernet. In one suchembodiment, the MAC 3220 network interface includes the followingsignals from the IEEE 802.3z Standard: 1) TXD—an output from MAC 2320providing 8 bits of transmit data; 2) TX_EN—an output from MAC 2320indicating TXD has valid data; 3) TX_ER—an output of MAC 2320 indicatinga coding violation on data received by MAC 2320; 4) COL—an input to MAC2320 indicating there has been a collision on the coupled communicationsmedium; 5) GTX_CLK—an output from MAC 2320 providing a 125 MHz clocktiming reference for TXD; and 6) TX_CLK—an output from MAC 2320providing a timing reference for TXD when the communications networkoperates at 10 megabits per second or 100 megabits per second.

One of ordinary skill will recognize that in alternate embodiments ofthe present invention MAC 2320 includes interfaces to physical layerdevices conforming to different network standards. In one suchembodiment, MAC 2320 implements a network interface for the IEEE 802.3standard for MII 2100 megabit per second Ethernet.

In one embodiment of the invention, TxMAC 2160 also transmits datapackets to a point-to-point link with a device that couples MPUstogether, such as cross-bar switches 3010 and 3110 described below withreference to FIGS. 36-45. In one such embodiment, the point-to-pointlink includes signaling that conforms to the GMII MAC interfacespecification.

MAC 2320 is coupled to buffer 2322 to receive framed words for datapackets. In one embodiment, each word contains 8 bits, while in otherembodiments alternate size words are employed. Buffer 2322 receives datawords from streaming data bus 2210. Streaming input engine 2154retrieves the packet data from memory, as will be described below ingreater detail. In one such embodiment, buffer 2322 is afirst-in-first-out (“FIFO”) buffer.

As explained above, MAC 2320 monitors outgoing data packet transmissionsfor errors. In one embodiment, MAC 2320 provides indications of whetherthe following occurred for each packet: 1) collisions; 2) excessivecollisions; and 3) underflow of buffer 2322.

TxMAC 2160 communicates with sequencer 2150 through sequencer interface2324. Sequencer interface 2324 is coupled to receive data on sequenceroutput bus 2200 and provide data on sequencer input bus 2202. Sequencerinterface 2324 is coupled to receive a signal from enable interface 2204to inform TxMAC 2160 whether it is activated.

Sequencer 2150 programs TxMAC 2160 for operation through controlregisters (not shown) in sequencer interface 2324. Sequencer 2150 alsoretrieves control information about TxMAC 2160 by querying these sameregisters. Sequencer interface 2324 is coupled to MAC 2320 and buffer2322 to provide and collect control register information.

The control registers in sequencer interface 2324 are coupled to inputdata bus 2202 and output data bus 2200. The registers are also coupledto control interface 2206 to provide for addressing and controllingregister store and load operations. Sequencer 2150 writes one of thecontrol registers to define the mode of operation for TxMAC 2160. In onemode, TxMAC 2160 is programmed for connection to a communicationsnetwork and in another mode TxMAC 2160 is programmed to theabove-described point-to-point link to another device. Sequencer 2150employs a register in TxMAC's set of control registers to indicate thenumber of bytes in the packet TxMAC 2160 is sending.

Sequencer interface 2324 provides the following signals to sequencercontrol interface 2206: 1) Retry—indicating a packet was not properlytransmitted and will need to be resent; 2) Packet Done—indicating thepacket being transmitted has left MAC 2320; and 3) Back-off—indicating adevice connecting MPUs in the above-described point-to-point mode cannotreceive a data packet at this time and the packet should be transmittedlater.

Sequencer 2150 receives the above-identified signals and responds byexecuting operations that correspond to the signals—this will bedescribed in greater detail below. In one embodiment, sequencer 2150executes corresponding micro-code routines in response to the signals.Once sequencer 2150 receives and responds to one of the above-describedsignals, sequencer 2150 performs a write operation to a control registerin sequencer interface 2320 to deassert the signal.

Sequencer 2324 receives an Abort signal from sequencer control interface2206. The Abort signal indicates that excessive retries have been madein transmitting a data packet and to make no further attempts totransmit the packet. Sequencer interface 2324 is coupled to MAC 2320 andbuffer 2322 to receive information necessary for controlling theabove-described signals and forwarding instructions from sequencer 2150.

In one embodiment, sequencer interface 2324 also provides the 9 ByteSize Advance signal to streaming input engine 2154.

b. Packet Transmission

FIG. 34 illustrates a process MPU 2010 employs in one embodiment of thepresent invention to transmit packets. At the outset, CPU 2060initializes sequencer 2150 (step 2330). CPU 2060 instructs sequencer2150 to transmit a packet and provides sequencer 2150 with the packet'ssize and address in memory. Next, sequencer 2150 initializes TxMAC 2160(step 2332) and streaming input engine 2154 (step 2334).

Sequencer 2150 writes to control registers in sequencer interface 2324to set the mode of operation and size for the packet to be transmitted.Sequencer 2150 provides the memory start address, data size, and modebits to streaming input engine 2154. Sequencer 2150 also issues theStart signal to streaming input engine 2154 (step 2336), which resultsin streaming input engine 2154 beginning to fetch packet data from datacache 2052.

Sequencer 2150 and streaming input engine 2154 combine to transferpacket data to TxMAC 2160 (step 2338). TxMAC 160 supplies the 9 ByteSize Signal to transfer data one byte at a time from streaming inputengine 2154 to buffer 2322 over streaming data bus 2210. Upon receivingthese bytes, buffer 2322 begins forwarding the bytes to MAC 2320, whichserializes the bytes and transmits them to a network interface (step2340). As part of the transmission process, TxMAC 2160 decrements thepacket count provided by sequencer 2150 when a byte is transferred tobuffer 2322 from streaming input engine 2154. In an alternateembodiment, sequencer 150 provides the 9 Byte Size Signal.

During the transmission process, MAC 2320 ensures that MAC leveloperations are performed in accordance with appropriate networkprotocols, including collision handling. If a collision does occur,TxMAC 2320 asserts the Retry signal and the transmission processrestarts with the initialization of TxMAC 2160 (step 2332) and streaminginput engine 2154 (step 2334).

While TxMAC 2160 is transmitting, sequencer 2150 waits for TxMAC 2160 tocomplete transmission (step 2342). In one embodiment, sequencer 2150monitors the Packet Done signal from TxMAC 2160 to determine whentransmission is complete. Sequencer 2150 can perform this monitoring bypolling the Packet Done signal or coupling it to an interrupt input.

Once Packet Done is asserted, sequencer 2150 invalidates the memorylocation where the packet data was stored (step 2346). This alleviatesthe need for MPU 2010 to update main memory when reassigning the cachelocation that stored the transmitted packet. In one embodiment,sequencer 2150 invalidates the cache location by issuing a lineinvalidation instruction to data cache 2052.

After invalidating the transmit packet's memory location, sequencer 2150can transmit another packet. Sequencer 2150 initializes TxMAC 2160 (step2332) and streaming input engine 2154 (step 2334) and theabove-described transmission process is repeated.

In one embodiment of the invention, the transmit process employs abandwidth allocation procedure for enhancing quality of service.Bandwidth allocation allows packets to be assigned priority levelshaving a corresponding amount of allocated bandwidth. In one suchembodiment, when a class exhausts its allocated bandwidth no furthertransmissions may be made from that class until all classes exhausttheir bandwidth—unless the exhausted class is the only class withpackets awaiting transmission.

Implementing such an embodiment can be achieved by making the followingadditions to the process described in FIG. 34, as shown in FIG. 35. WhenCPU 2060 initializes sequencer 2150 (step 2330), CPU 2060 assigns thepacket to a bandwidth class. Sequencer 2150 determines whether there isbandwidth available to transmit a packet with the assigned class (step2331). If not, sequencer 2150 informs CPU 2060 to select a packet fromanother class because the packet's bandwidth class is oversubscribed.The packet with the oversubscribed bandwidth class is selected at alater time (step 2350). If bandwidth is available for the assignedclass, sequencer 2150 continues the transmission process described forFIG. 34 by initializing TxMAC 2160 and streaming input engine 2154.After transmission is complete sequencer 2150 decrements an availablebandwidth allocation counter for the transmitted packet's class (step2345).

In one embodiment, MPU 2010 employs 4 bandwidth classes, having initialbandwidth allocation counts of 128, 64, 32, and 16. Each count isdecremented by the number of 16 byte segments in a transmitted packetfrom the class (step 2345). When a count reaches or falls below zero, nofurther packets with the corresponding class are transmitted—unless noother class with a positive count is attempting to transmit a packet.Once all the counts reach zero or all classes attempting to transmitreach zero, sequencer 2150 resets the bandwidth allocation counts totheir initial count values.

E. Connecting Multiple MPU Engines

In one embodiment of the invention, MPU 2010 can be connected to anotherMPU using TxMAC 2160 or RxMAC 2170. As described above, in one suchembodiment, TxMAC 2160 and RxMAC 2170 have modes of operation supportinga point-to-point link with a cross-bar switch designed to couple MPUs.Two such cross-bar switches are cross-bar switch 3010 and cross-barswitch 3110 disclosed below with reference to FIGS. 36-45. In alternateembodiments, RxMAC 2170 and TxMAC 2160 support interconnection withother MPUs through bus interfaces and other well know linking schemes.

In one point-to-point linking embodiment, the network interfaces ofTxMAC 2160 and RxMAC 2170 are modified to take advantage of the factthat packet collisions don't occur on a point-to-point interface.Signals specified by the applicable network protocol for collision, suchas those found in the IEEE 802.3 Specification, are replaced with ahold-off signal.

In such an embodiment, RxMAC 2170 includes a hold-off signal that RxMAC2170 issues to the interconnect device to indicate RxMAC 2170 cannotreceive more packets. In response, the interconnect device will nottransmit any more packets after the current packet, until hold-off isdeasserted. Other than this modification, RxMAC 2170 operates the sameas described above for interfacing to a network.

Similarly, TxMAC 2160 includes a hold-off signal input in oneembodiment. When TxMAC 2160 receives the hold-off signal from theinterconnect device, TxMAC halts packet transmission and issues theBack-off signal to sequencer 2150. In response, sequencer 2150 attemptsto transmit the packet at a later time. Other than this modification,TxMAC 2160 operates the same as described above for interfacing to anetwork.

III. Cross Bar Switch

A. System Employing a Cross-Bar Switch

FIG. 36 illustrates a system employing cross-bar switches 3010, 3012,and 3014, which operate in accordance with the present invention.Cross-bar switch 3010 is coupled to transfer packets between cross-barswitch 3012 and data terminal equipment (“DTE”) 3020, 3022, 3030 and3032. Cross-bar switch 3012 is coupled to transfer packets betweencross-bar switches 3010 and 3014 and DTE 3024, 3026, and 3034. Cross-barswitch 3014 is coupled to transfer packets between cross-bar switch 3012and DTE 3028, 3036, and 3038. In one embodiment of the presentinvention, switch elements 200 in FIG. 4 are cross-bar switches 3010.

DTE is a generic name for a computing system including a processingengine, ranging from a complex multi-processor computer system to astand-alone processing engine. At least one example of a DTE ismulti-processor unit 2010 described above with reference to FIGS. 16-25.

In one embodiment, all of the elements appearing in FIG. 36 reside inthe same system and are coupled together by intra-system communicationslinks. Alternatively, the elements in FIG. 36 are located in separatesystems and coupled together over a communications network. An exampleof one such communications network is a network conforming to theInstitute of Electrical and Electronic Engineers (“IEEE”) 802.3 Standardemploying GMII Gigabit Ethernet signaling. Intra-system communicationslinks employing such signaling standards can also be employed.

B. Cross-Bar Switch

FIG. 37 depicts circuitry for one embodiment of cross-bar switch 3010 inaccordance with the present invention. Although explained in detailbelow with reference to cross-bar switch 3010, the circuitry shown inFIG. 37 is also applicable to cross-bar switches 3012 and 3014 in FIG.36. In one embodiment, cross-bar switch 3010 is implemented in anintegrated circuit. Alternatively, cross-bar switch 3010 is notimplemented in an integrated circuit.

Cross-bar switch 3010 includes input ports 3040, 3042, 3044, 3046, 3048,and 3050 for receiving data packets on communications links 3074, 3076,3078, 3080, 3082, and 3084, respectively. Each communications link 3074,3076, 3078, 3080, 3082, and 3084 is designed for coupling to a datasource, such as a DTE or cross-bar device, and supports protocol andsignaling for transferring packets. One such protocol and signalingstandard is the IEEE 802.3 Standard for a communications networksupporting GMII Gigabit Ethernet.

Each input port is coupled to another input port via data ring 3060.Data ring 3060 is formed by data ring segments 3060 ₁-3060 ₆, which eachcouple one input port to another input port. Segment 3060 ₁ couplesinput port 3050 to input port 3040. Segment 3060 ₂ couples input port3040 to input port 3042. Segment 3060 ₃ couples input port 3042 to inputport 3044. Segment 3060 ₄ couples input port 3044 to input port 3046.Segment 3060 ₅ couples input port 3046 to input port 3048. Segment 3060₆ couples input port 3048 to input port 3050, completing data ring 3060.

When an input port receives a data packet on a communications link, theinput port forwards the data packet to another input port via the dataring segment coupling the input ports. For example, input port 3040forwards data received on communications link 3074 to input port 3042via ring segment 3060 ₂. Input port 3042 forwards data received oncommunications link 3076 to input port 3044 via ring segment 3060 ₃.Input port 3044 forwards data received on communications link 3078 toinput port 3046 via ring segment 3060 ₄. Input port 3046 forwards datareceived on communications link 3080 to input port 3048 via ring segment3060 ₅. Input port 3048 forwards data received on communications link3082 to input port 3050 via ring segment 3060 ₆. Input port 3050forwards data received on communications link 3084 to input port 3040via ring segment 3060 ₁.

Input ports also forward data received on a data ring segment to anotherinput port. For example, input port 3040 forwards data received on ringsegment 3060 ₁ to input port 3042 via ring segment 3060 ₂. Input port3042 forwards data received on ring segment 3060 ₂ to input port 3044via ring segment 3060 ₃. Input port 3044 forwards data received on ringsegment 3060 ₃ to input port 3046 via ring segment 3060 ₄. Input port3046 forwards data received on ring segment 3060 ₄ to input port 3048via ring segment 3060 ₅. Input port 3048 forwards data received on ringsegment 3060 ₅ to input port 3050 via ring segment 3060 ₆. Input port3050 forwards data received on ring segment 3060 ₆ to input port 3040via ring segment 3060 ₁.

Cross-bar switch 3010 also includes data rings 3062 and 3064. Althoughnot shown in detail, data rings 3062 and 3064 are the same as data ring3060, each coupling input ports (not shown) together via ring segments.In some embodiments, however, data rings 3060, 3062, and 3064 includedifferent numbers of segments supporting different numbers of inputports.

Cross-bar 3010 includes sink ports 3052, 3054, 3055, 3056, 3057, and3058 for transmitting data packets onto communications links 3066, 3068,3069, 3070, 3071, and 3072, respectively. Sink ports 3052, 3054, 3055,3056, 3057, and 3058 are each coupled to data rings 3060, 3062, and 3064to receive data that input ports supply to rings 3060, 3062, and 3064.Sink ports 3052, 3054, 3055, 3056, 3057, and 3058 snoop data on datarings 3060, 3062, and 3064 to determine whether the data is targeted fora device coupled to the sink port's communication link, such as a DTE orcross-bar switch. Each communications link 3066, 3068, 3069, 3070, 3071,and 3072 is designed for coupling to a data target, such as a DTE orcross-bar device, and supports protocol and signaling for transferringpackets. One such protocol and signaling standard is the IEEE 802.3Standard for a communications network supporting GMII Gigabit Ethernet.

Sink ports 3052, 3054, 3055, 3056, 3057, and 3058 are each capable ofsupporting data transfers to multiple target addresses on theirrespective communications links—allowing cross-bar switch 3010 toimplicitly support multicast addressing. Sink ports 3052, 3054, 3055,3056, 3057, and 3058 are each capable of simultaneously receivingmultiple data packets from rings 3060, 3062, and 3064 and transferringthe data to the identified targets—allowing cross-bar switch 3010 to benon-blocking when multiple input ports receive data packets destined forthe same target. This functionality provides advantages over traditionalcross-bar switches, which only support one target address per outputport and one packet at a time for a target.

FIG. 38 depicts a flow diagram illustrating a series of steps performedby cross-bar switch 3010. A user configures cross-bar switch 3010 foroperation (step 3090). In operation, the input ports in cross-bar switch3010 receive packets on their respective communications links (step3092). The input ports provide the packets to the sink ports incross-bar switch 3010. In cross-bar switch 3010 in FIG. 37, the inputports forward the packet data to either data ring 3060, 3062, or 3064for retrieval by the sink ports (step 3094).

Each sink port performs a snooping and collection process—identifyingand storing packets addressed to targets supported by the sink port(step 3096). Each sink port snoops the packet data on rings 3060, 3062,and 3064 to determine whether to accept the data (step 3098). If a sinkport detects that a packet fails to meet acceptance criteria, then thesink port does not accept the packet. If a sink port determines that apacket meets acceptance criteria, then the sink port collects the packetdata from ring 3060, 3062, or 3064 (step 3100). Cross-bar switch 3010transmits packets collected in the sink ports to targeted destinationsvia the sink ports' respective communication links (step 3102). Furtherdetails regarding sink port operation appear below, including theacceptance and collection of packets.

In configuration (step 3090), a user sends configuration packets to atleast one input port in cross-bar switch 3010 for delivery to adesignated sink port. Configuration packets include configurationsettings and instructions for configuring the targeted sink port. Forexample, input port 3040 forwards a configuration packet to data ring3060 targeted for sink port 3052. Sink port 3052 retrieves theconfiguration packet from ring 3060 and performs a configurationoperation in response to the configuration packet. In some instances, adesignated sink port responds to a configuration packet by sending aresponse packet, including status information. Alternatively, thedesignated sink port responds to the configuration packet by writingconfiguration data into internal control registers.

Table I below shows a sink port configuration and status registerstructure in one embodiment of the present invention.

TABLE I Sink Port Configuration and Status Register Structure P PortAddress Table [31:0] Port Address Table [63:32] Port Address Table[95:64] Port Address Table [127:96] R Retry Time [15:0] FIFOThresholds/Priority Weighting Values [23:0] Total Packet CountConfiguration Packet Count Port Enable Rejection Count Packet SizeRejection Count Bandwidth Allocation Rejection Count Sink OverloadRejection Count

The sink port registers provide the following configuration settings: 1)Port Enable (“P”)—set to enable the sink port and deasserted to disablethe sink port; 2) Port Address Table [127:0]—set bits identify thedestination addresses associated with the sink port. For example, whenbits 64, 87, and 123 are set, the sink port accepts data packets withthose destination addresses; 3) Retry Mode (“R”)—set to enable retryoperation for the sink port and deasserted to disable retry operation(further details regarding retry operation appear below); 4) Retry Time[15:0]—set to indicate the period of time allowed for retrying a packettransmission; and 5) FIFO Thresholds and Priority Weighting Values[23:0]−set to identify FIFO thresholds and priority weighting valuesemployed in bandwidth allocation management, which is described indetail below.

The sink port register block also maintains the following statusregisters: 1) Total Packet Count—indicating the number ofnon-configuration packets accepted by the sink port from data rings3060, 3062, and 3064; 2) Configuration Packet Count—indicating thenumber of configuration packets received by cross-bar switch 3010; 3)Port Enable Rejection Count—indicating the number of packets having adestination address supported by the sink port, but rejected due to thesink port being disabled; 4) Packet Size Reject Count—indicating thenumber of packets rejected by the sink port because not enough storageroom existed for them in the sink port; 5) Bandwidth AllocationRejection Count—indicating the number of packets rejected by the sinkport for bandwidth allocation reasons; 6) Sink Overload RejectionCount—indicating the number of packets rejected by the sink port becausethe sink port was already receiving a maximum allowable number ofpackets.

FIG. 39 shows cross-bar switch 3110—an alternate version of cross-barswitch 3010, providing explicit support for multicast packets. Incross-bar switch 3110, the elements with the same reference numbersappearing in cross-bar switch 3010 operate as described for cross-barswitch 3010 with any additional functionality being specified below.Cross-bar switch 3110 includes multi-sink port 3112, which is coupled tosink ports 3052, 3054, 3055, 3056, 3057, and 3058 by interface 3114.Multi-sink port 3112 is also coupled to data rings 3060, 3062, and 3064.In one embodiment of the present invention, switching elements 200 inFIG. 4 are cross-bar switches 3110.

In operation, multi-sink port 3112 snoops data on rings 3060, 3062, and3064. Multi-sink port 3112 accepts multicast packets that havedestination addresses included within a set of addresses supported bymulti-sink port 3112. Multi-sink port 3112 forwards accepted packetsover interface 3114 to sink ports in cross-bar switch 3110 that havecommunication links leading to at least one of the addresseddestinations. The sink ports then transfer the packets to their intendeddestinations. Greater details regarding the operation of multi-sink port3112 appear below.

Like sink ports 3052, 3054, 3055, 3056, 3057, and 3058, multi-sink port3112 also maintains a set of configuration and status registers. TableII below shows a register structure for multi-sink port 3112 in oneembodiment of the present invention.

TABLE II Multi-Sink Port Configuration and Status Register Structure TPort Address Table [31:0] Port Address Table [63:32] Port Address Table[95:64] Port Address Table [127:96] FIFO Thresholds/Priority WeightingValues [23:0] Total Packet Count Configuration Packet count Port EnableRejection Count Packet Size Rejection Count Bandwidth AllocationRejection Count Sink Overload Rejection Count Multicast Register 0[19:0] . . . Multicast Register 63 [19:0]

The multi-sink port registers with the same name as sink port registersperform the same function. The multi-sink port register block includesthe following additional registers: 1) Multicast Timeout Select(“T”)—set to indicate the maximum timeout for multicast packets. In oneembodiment the maximum timeout is either 1,600 or 9,000 internal clockcycles of cross-bar switch 3110; and 2) Multicast Registers 0-63—eachidentifying a set of sink ports to be targeted in response to amulticast destination address.

In one embodiment, cross-bar 3110 includes 20 sink ports and eachMulticast Register contains 20 corresponding bits. Each set bitindicates that the corresponding sink port is targeted to receivepackets with destination addresses corresponding to the MulticastResister's address. Multi-sink port 3112 accepts all packets withdestination addresses selected in the Port Address Table and maps thelast 6 bits of the destination address to a Multicast Register (SeeTable II). Further details about the operation of multi-sink port 3112appear below.

The above-described implementations of cross-bar switches 3010 and 3110are only two examples of cross-bar switches in accordance with thepresent invention. Many possible variations fall within the scope of thepresent invention. For example, in one embodiment of the presentinvention, rings 3060, 3062, and 3064 are each capable of linking 8input ports together and have connections to 24 sink ports. In one suchembodiment, cross-bar switch 3010 in FIG. 37 and cross-bar switch 3110in FIG. 39 each include 20 input ports and 20 sink ports—leaving 4 inputport slots unused and 4 sink port slots unused. In this embodiment, eachsink port supports up to 128 target addresses and can simultaneouslyaccept up to 7 data packets—6 from input ports and 1 from multi-sinkport 3112. In alternate embodiments, there is no limit on the number ofdata packets simultaneously accepted by a sink port.

C. Data Rings

Rings 3060, 3062, and 3064 (FIGS. 37 and 49) include a data field and acontrol field. In one embodiment of the present invention, the datafield is 8 bytes wide and the control field includes the followingsignals: 1) Data Valid—indicating whether the data field contains validdata; 2) Valid Bytes—indicating the number of valid bytes in the datafield; 3) First Line—indicating whether the data field contains thefirst line of data from the packet supplied by the input port; 4) LastLine—indicating whether the data field contains the last line of datafrom the packet supplied by the input port; and 5) Source—identifyingthe input port supplying the packet data carried in the data field.

One with ordinary skill will recognize that different control signalsand different data field widths can be employed in alternate embodimentsof the present invention.

D. Packet Formats

Cross-bar switches 3010 and 3110 support the following 3 types ofpackets: 1) Data Packets; 2) Configuration Packets; and 3) ReadConfiguration Response Packets.

1. Data Packets

Cross-bar switches 3010 and 3110 employ data packets to transfernon-configuration information. Table III below illustrates the format ofa data packet in one embodiment of the present invention.

TABLE III Data Packet Format 0 Destination Address 1 Size [7:0] 2Priority Level Size [13:8] 3 4 5 6 7 8-end Payload

A data packet includes a payload and header. The header appears in thedata packet's first 8 bytes (Bytes 0-7). The payload immediately followsthe header. In one embodiment, the payload is a packet that complieswith the IEEE 802.3 Standard for a data packet, except the preamblefield is excluded. In one such embodiment, legal packet sizes range from64 bytes to 9,216 bytes.

The header includes the following fields: 1) DestinationAddress—identifying the data packet's targeted destination; 2) Size[13:0]—providing the data packet's size in bytes; 3) PriorityLevel—providing a priority level for the data packet that is used inbandwidth allocation management. The remaining portion of the header isreserved.

In one embodiment, cross-bar switches 3010 and 3110 perform errorchecking to ensure that an incoming packet contains the number of bytesindicated in the packet's Size field. If there is an error, the packetwill be flagged with an error upon subsequent transmission. In one suchembodiment, input ports perform the size check and pass errorinformation on to the sink ports.

2. Configuration Packets

Configuration packets carry configuration instructions and settings forcross-bar switches 3010 and 3110. Table IV below shows the format of aconfiguration packet in one embodiment of the present invention.

TABLE IV Configuration Packet Format 0 Configuration Identifier 1 2Cross-Bar Switch Identifier . . . 8 Command 9 Configuration RegisterAddress (“CRA”) [7:0] 10  Port Identifier CRA [10:8] . . . 16-63 Data

The configuration packet is 64 bytes long, allowing the entire packet tofit on either data ring 3060, 3062, or 3064. The configuration packetincludes the following fields: 1) Configuration Identifier—identifyingthe packet as a configuration packet. In one embodiment, this field isset to a value of 127; 2) Cross-Bar Switch Identifier—identifying thecross-bar switch for which the configuration packet is targeted; 3)Command—identifying the configuration operation to be performed inresponse to the packet; 4) Port Identifier—identifying a sink port ormulti-sink port in the identified cross-bar switch; 5) ConfigurationRegister Address (“CRA”) [10:0]—identifying a configuration register inthe identified sink port or multi-sink port; 6) Data—containing dataused in the configuration operation. Remaining fields in theconfiguration packet are reserved.

A configuration packet containing a write command causes the identifiedcross-bar switch to write configuration data into to the identifiedconfiguration register in the identified sink port. In a write commandconfiguration packet, the Data field contains a value for the sink portto write into the identified configuration register. In one embodiment,this value can be up to 4 bytes long.

A configuration packet containing a read command causes the identifiedcross-bar switch to send a response packet containing the values ofregisters in the identified sink port. In a read command configurationpacket, the Data field contains a header to be used by a readconfiguration response packet.

In one embodiment the header is 16 bytes, as shown below in thedescription of the read configuration response packets. This header isuser programmable and set to any value desired by the entity issuing theread command configuration packet.

3. Read Configuration Response Packets

Read configuration response packets carry responses to read commandsissued in configuration packets. Multi-sink port 3112 and sink ports3052, 3054, 3055, 3056, 3057, and 3058 supply read configurationresponse packets on their communications links. Table V below shows theformat of a sink port's read configuration response packet.

TABLE V Sink Port Read Configuration Response Packet Format 0 Header[31:0] 1 Header [63:32] 2 Header [95:64] 3 Header [127:96] 4 PriorityWeighting FIFO Thresholds [11:0] R P Values [11:0] 5 Retry Time 6 PortAddress Table [31:0] 7 Port Address Table [63:32] 8 Port Address Table[95:64] 9 Port Address Table [127:96] 10 Total Packet Count 11Configuration Packet Count 12 Port Enable Rejection Count 13 Packet SizeRejection Count 14 Bandwidth Allocation Rejection Count 15 Sink OverloadRejection Count

Header [127:0] is the header provided in the read command configurationpacket. The remaining fields of the read configuration response packetprovide the data held in the above-described sink port registers withcorresponding names (See Table I).

Table VI below shows the format of a multi-sink port's readconfiguration response packet.

TABLE VI Multi-Sink Port Read Configuration Response Packet Format 0Header [31:0] 1 Header [63:32] 2 Header [95:64] 3 Header [127:96] 4Priority Weighting FIFO Thresholds [11:0] T Values [11:0] 5 MulticastRegister [19:0] 6 Port Address Table [31:0] 7 Port Address Table [63:32]8 Port Address Table [95:64] 9 Port Address Table [127:96] 10 TotalPacket Count 11 Configuration Packet Count 12 Port Enable RejectionCount 13 Packet Size Rejection Count 14 Bandwidth Allocation RejectionCount 15 Sink Overload Rejection Count

Header [127:0] is the header provided in the read command configurationpacket. The Multicast Register field contains the contents of themulti-sink port's Multicast Register that corresponds to theconfiguration packet's Configuration Register Address field. Theremaining fields of the read configuration response packet provide thedata held in the above-described multi-sink port registers withcorresponding names (See Table II).

E. Input Ports

FIG. 40 shows a block diagram of input port 3040. FIG. 40 is alsoapplicable to input ports 3042, 3044, 3046, 3048, and 3050.

Input port 3040 includes communications interface 3120 coupled toreceive data from communications link 3074. Communication interface 3120is coupled to provide the received data to FIFO 3122, so the databecomes synchronized with the cross-bar switch's internal clock. In oneversion of input port 3040, FIFO 3122 holds 32 bytes.

FIFO 3122 is coupled to provide the received data to ring interface3124, which is coupled to data ring 3060. Ring interface 3124 is alsocoupled to receive data from data ring segment 3060 ₁. Ring interface3124 forwards data onto ring 3060 via data ring segment 3060 ₂. Inaddition to providing data, ring interface 3124 also generates andprovides the above-described data ring control information on ringsegment 3060 ₂.

Data is forwarded on ring 3060 in time slots. Input port 3040 isallotted a time slot on ring 3060 for forwarding data fromcommunications link 3074 onto ring segment 3060 ₂. In each remainingtime slot, input port 3040 forwards data from ring segment 3060 ₁ ontosegment 3060 ₂. In one embodiment, all input ports coupled to ring 3060place communications link data onto ring 3060 in the same time slot.When ring interface 3124 receives data on segment 3060 ₁ that originatedfrom sink port 3040, ring interface 3124 terminates any furtherpropagation of this data on ring 3060. In one embodiment, sink port 3040recognizes the arrival of data originating from sink port 3040 bycounting the number of time slots that elapse after placing data fromlink 3074 onto any segment 3060 ₂—sink port 3040 knows the number oftime slots required for data placed on ring 3060 by port 3040 topropagate around ring 3060 back to port 3040.

In one embodiment, the interface between communications interface 3120and communications link 3074 includes the following signals: 1) RXD—aninput to input port 3040 providing 8 bits of received data; 2) RX_EN—aninput to input port 3040 indicating RXD is valid; 3) RX_ER—an input toinput port 3040 indicating an error in RXD; 4) COL—an output from inputport 3040 indicating that the cross-bar switch cannot accept theincoming data on RXD; and 5) RX_CLK—an input to input port 3040providing a 125 MHz clock for timing reference for RXD.

In one embodiment of the present invention, the above-described signalsconform to the reception signals in the IEEE 802.3 Standard for GMIIGigabit Ethernet. In one such embodiment, RX_CLK is the same frequencyas the internal clock of cross-bar switch 3010 within 100 parts permillion.

One of ordinary skill will recognize that in alternate embodiments ofthe present invention communications interface 3120 interfaces todevices conforming to different network standards than described above.

F. Sink Ports

FIG. 41 depicts one version of sink port 3052 that is also applicable tosink ports 3054, 3055, 3056, 3057, and 3058. Sink port 3052 includesring interface 3132 coupled to receive data from data rings 3060, 3062,and 3064. Ring interface 3132 accepts data packets targeted for sinkport 3052. Ring interface 3132 also accepts configuration packetsaddressed to cross-bar switches other than the one containing ringinterface 3132—these configuration packets are treated as data packets.Further details regarding data acceptance is presented below.

Ring interface 3132 is coupled to FIFOs 3136, 3138, and 3140 to provideimmediate storage for data retrieved from rings 3060, 3062, and 3064.FIFOs 3136, 3138, and 3140 each store data from a respective ring. FIFO3136 stores data from ring 3060. FIFO 3138 stores data from ring 3062.FIFO 3140 stores data from ring 3064.

FIFO request logic 3146 couples FIFOs 3136, 3138, and 3140 to FIFO 3148.FIFO request logic 3146 is also coupled to multi-sink port interface3114 for coupling multi-sink port 3112 to FIFO 3148. FIFO 3148 iscoupled to output port 3152 to provide packet data for transmission ontocommunications link 3066.

FIFO 3148 serves as a staging area for accumulating packet data fortransmission onto communications link 3066. In one embodiment, FIFOrequest logic 3146 arbitrates access to FIFO 3148 over an 8 cycleperiod. One cycle is dedicated to transferring data from interface 3114to FIFO 3148, if data exists on interface 3114. Another cycle isreserved for transferring data from FIFO 3148 to output port 3152. Theremaining cycles are shared on a round-robin basis for FIFOs 3136, 3138,and 3140 to transfer data to FIFO 3148.

In an alternate embodiment, FIFO 3148 is a multiple port memory capableof simultaneously performing data exchanges on 4 ports. In such anembodiment, there is no need to arbitrate access to FIFO 3148 and FIFOs3136, 3138, and 3140 can be eliminated ring interface 3132 directlytransfers data to FIFO 3148. In this embodiment, the number of packetsthat can be simultaneously received by sink port 3052 is not limited to7, since FIFO 3148 is no longer shared over 8 cycles.

Output port 3152 ensures that packets are transmitted ontocommunications link 3066 in accordance with the signaling protocolemployed on link 3066. In one embodiment, communications link 3066employs the following signals: 1) TXD—an output from sink port 3052providing a byte of transmit data; 2) TX_EN—an output from sink port3052 indicating TXD has valid data; 3) TX_ER—an output of sink port 3052indicating an error with the data transmitted by sink port 3052; 4)TX_CLK—an output from sink port 3052 providing a timing reference forTXD; 5) Hold-off/Retry—an input to sink port 3052 indicating thereceiving port cannot accept data (TXD).

The sink port's Retry Mode register controls the operation ofHold-off/Retry (See Table I). When retry mode is enabled, sink port 3052aborts data transmission on communications link 3066 when Hold-off/Retryis asserted. Sink port 3052 attempts to retransmit the aborted packet ata later time after Hold-off/Retry is deasserted. Sink port 3052 attemptsto retransmit the packet for the time period indicated in the sinkport's Retry Time register (See Table I). When retry mode is notenabled, asserting Hold-off/Retry causes sink port 3052 to discontinuedata transmission on communications link 3066 once the current packettransmission is complete. Sink port 3052 resumes data transmission oncommunications link 66 once Hold-off/Retry is deasserted.

In one embodiment of the present invention, the above-described signals,except Hold-off/Retry, conform to the transmission signals in the IEEE802.3 Standard for GMII Gigabit Ethernet. In one such embodiment, TX_CLKis the same frequency as the internal clock of cross-bar switch 3010,and output port 3152 provides an inter-packet gap of 12 TX_CLK cyclesbetween transmitted packets.

One of ordinary skill will recognize that in alternate embodiments ofthe present invention sink port 3052 includes interfaces to devicesconforming to different signaling standards.

Sink port 3052 also includes content addressable memory (“CAM”) 3144.CAM 3144 maintains a list of pointers into FIFO 3148 for each of thedata packets accepted by ring interface 3132. Ring interface 3052 andFIFO request logic 3146 are coupled to CAM 3144 to provide informationabout received packets. Based on the provided information, CAM 3144either creates or supplies an existing FIFO pointer for the packet databeing received. Using the supplied pointers, FIFO request logic 3146transfers data from interface 3114 and FIFOs 3136, 3138, and 3140 toFIFO 3148. The combination of FIFO request logic 3146, CAM 3144 and FIFO3148 form a multiple entry point FIFO—a FIFO capable of receiving datafrom multiple sources, namely interface 3114 and FIFOs 3136, 3138, 3140,and 3148. Further details regarding the operation of CAM 3144 appearbelow.

Sink port 3052 includes bandwidth allocation circuit 3134 to ensurequality of service by regulating sink port bandwidth for differentpacket priority levels. Bandwidth allocation circuit 3134 is coupled toexchange data with ring interface 3132 to facilitate bandwidthallocation management, which is described in detail below.

Sink port 3052 includes configuration block 3130 for receivingconfiguration packets. Configuration block 3130 is coupled to data rings3060, 3062, and 3064 to accept configuration packets addressed to sinkport 3052 in cross-bar switch 3010 (switch 3110 in FIG. 39).Configuration block 3130 contains the sink port register structuredescribed above with reference to Table I.

In response to a write command configuration packet, configuration block3130 modifies the register block in sink port 3052. In response to aread command configuration packet, configuration block 3130 creates aread configuration response packet, as described above with reference toTable V. Configuration block 3130 is coupled to output port 3152 toforward the read configuration response packet onto communications link3066. Configuration block 3130 is also coupled to Ring interface 3132,FIFO request logic 3146, bandwidth allocation circuit 3134, and outputport 3152 to provide configuration settings.

FIG. 42 illustrates steps performed during the operation of sink port3052 to store data in FIFO 3148 in one embodiment of the presentinvention. The same process is applicable to sink ports 3054, 3055,3056, 3057, and 3058.

When sink port 3052 detects data on data ring 3060, 3062, or 3064, sinkport 3052 determines whether the data belongs to a configuration packetdirected to sink port 3052 (step 3160). Sink port 3052 examines theincoming packet for the following conditions: 1) ConfigurationIdentifier signaling a configuration packet; 2) Cross-Bar SwitchIdentifier identifying the cross-bar switch housing sink port 3052; and3) Port Identifier identifying sink port 3052. If these conditions aremet, sink port 3052 identifies the packet as a configuration packet forsink port 3052 and performs the configuration command specified in thepacket (step 3162). Otherwise, ring interface 3132 determines whether toaccept the incoming packet data (step 3164).

In performing configuration operations (step 3162) sink port 3052forwards the incoming packet to configuration block 3130. Configurationblock 3130 performs the command called for in the packet. In response toa write command, configuration block 3130 modifies the configurationregisters in sink port 3052 in accordance with the packet's writeinstruction. In response to a read command, configuration block 3130generates a read configuration response packet and forwards the packetto output port 3152 for transmission onto communications link 3066.

When determining whether to accept the packet (step 3164), ringinterface 3132 makes a series of evaluations. In one embodiment of thepresent invention, these include verifying the following conditions: 1)sink port 3052 is configured to accept the packet's Destination Address,if the First Line data ring control signal is asserted; 2) sink port3052 is currently accepting data from the input port source providingthe data, if the First Line data ring control signal is not asserted; 3)bandwidth allocation logic 3134 has not indicated that the prioritylevel for the received data is halted, if the First Line data ringcontrol signal is asserted; 4) sink port 3052 has not already acceptedthe maximum allowable number of packets for concurrent reception; 5)sink port 3052 is enabled to accept packet data; 6) the packet is alegal packet size—in one embodiment a legal packet size ranges from 3064to 9,000 bytes; and 7) space is available for the packet in FIFO 3148.

Sink port 3052 rejects the incoming data if the incoming packet datafails to meet any of the conditions (step 3182). Sink port 3052 issuesthe rejection signal to the input port that placed the rejected packetdata on data ring 3060, 3062, or 3064. The input port stops receivingthe packet and makes no more transfers of the packet's data to data ring3060, 3062, or 3064. When the rejected packet is targeted to multiplesink ports, the other sink ports will also stop receiving the packetdata on ring 3060, 3062, or 3064. The loss of data causes these ports toassert the TX_ER signal if packet transmission has already started.

If all the acceptance conditions are met, sink port 3052 conditionallyaccepts the packet data. As part of initially accepting the data, ringinterface 3132 provides the data ring control signals to CAM 3144. CAM3144 determines whether the data originates from a packet's first line(step 3166). If the data is a first line, then CAM 3144 allocates a newCAM entry for the packet (step 3170). In one embodiment, each CAM entryincludes an address tag and a pointer into FIFO 3148. The address tagcontains the Source Identifier for the packet from the data ring controlsignals. The pointer into FIFO 3148 serves as an address in FIFO 3148for beginning to store the received data. The address for the pointerinto FIFO 3148 is determined at a later time.

Once a CAM location is allocated, FIFO request logic 3146 determineswhether FIFO 3148 still has room for the newly accepted packet (step3172). As described above, FIFO request logic 3146 transfers data fromFIFOs 3136, 3138, and 3140 to FIFO 3148. When FIFO request logic 3146retrieves data for a new packet from FIFO 3136, 3138, or 3140, requestlogic 3146 makes this determination by comparing the bytes available inFIFO 3148 to the Size field in the data packet header.

If FIFO 3148 does not have sufficient space, then sink port 3052 rejectsthe packet (step 3182) and purges the packet's allocated entry in CAM3144. If FIFO 3144 has sufficient space, FIFO request logic 3146allocates a block of memory in FIFO 3148 for the packet (3174). As partof the allocation, FIFO request logic 3146 supplies CAM 3144 with a FIFOpointer for the packet (step 3174). Once a block of memory in FIFO 3148is allocated, request logic 3146 stores the packet data in FIFO 3148(step 3176). As part of storing the data in FIFO 3148, FIFO requestlogic 3146 provides CAM 3144 with an updated FIFO pointer to thelocation in FIFO 3148 for the next data received from this packet.

If the accepted packet data is not a packet's first line (step 3166),then CAM 3144 determines whether a FIFO pointer for the data's packet ismaintained in CAM 3144 (step 3168). CAM 3144 compares the SourceIdentifier provided by ring interface 3132 against the address tags inCAM 3144. If CAM 3144 doesn't find a match, the accepted data is droppedand the process for that packet is done in sink port 3052 (step 3178).

If CAM 3144 locates a matching source tag (step 3168), then CAM 3144provides the corresponding pointer into FIFO 3148 to FIFO request logic3146 when requested (step 3180). FIFO request logic 3146 requests thepointer after removing data from FIFO 3136, 3138, or 3140. Afterobtaining the FIFO pointer, FIFO request logic 3146 stores the data inFIFO 3148 and provides CAM 3144 with an updated FIFO pointer (step3176).

After performing a data store, FIFO request logic 3146 determineswhether the stored data is the last line of a packet (step 3184). In oneembodiment, FIFO request logic 3146 receives the Last Line data ringcontrol signal from ring interface 3132 to make this determination. Inan alternate embodiment, the control signals from data rings 3060, 3062,and 3064 are carried through FIFOs 3136, 3138, and 3140, along withtheir corresponding data. If the data is a packet's last line, then FIFOrequest logic 3146 instructs CAM 3144 to purge the entry for the packet(step 3188). Otherwise, no further action is taken with respect to thestored data.

Output port 3152 retrieves packet data from FIFO 3148 and transmitspackets onto communications link 3066. FIFO request logic 3146 providesoutput port 3152 with a signal indicating whether FIFO 3148 is empty. Aslong as FIFO 3148 is not empty, output port 3152 retrieves packet datafrom FIFO 3148.

When multi-sink port 3112 wishes to transfer a data packet to sink-port3052, multi-sink port 3112 issues a request to sink port 3052 oninterface 3114. FIFO request logic 3146 receives the request and sinkport 3052 determines whether to accept the packet data. Sink port 3052accepts the data if sink port 3052 is enabled and FIFO 3148 in sink port3052 has capacity to handle the additional packet.

In one embodiment, sink port 3052 performs the steps shown in FIG. 42with the following exceptions and modifications. Sink port 3052 does notdetermine whether multi-sink port 3112 is sending a configurationpacket—this is not necessary. FIFO request logic 3146 determines whetherto accept the packet from multi-sink port 3112 (step 3164), instead ofring interface 3132 making this determination.

In response to a multi-sink request, the acceptance step (3164) ismodified. Acceptance is initially granted by FIFO request logic 3146asserting an acknowledgement signal on interface 3114, if sink port 3052is enabled. If sink port 3052 is not enabled, FIFO request logic 3146does not assert an acknowledgement. After sink port 3052 issues anacknowledgement, multi-sink port 3112 sends packet data to FIFO requestlogic 3146. The remaining process steps described in FIG. 42 areperformed for the data from multi-sink port 3112. In one embodiment, ifsink port 3052 discovers that FIFO 3148 has insufficient space (step3172, FIG. 42), sink port 3052 withholds acknowledgement from multi-sinkport 3112—sink port 3052 does not issue a rejection signal.

Sink port 3052 regulates access to FIFO 3148, so multi-sink port 3112and data rings 3060, 3062, and 3064 have access for write operations andoutput port 3152 has access for read operations. In one embodiment, sinkport 3052 allocates access to FIFO 3148 within every 8 accesses to FIFO3148. Within every 8 accesses to FIFO 3148, sink port 3052 allocates 6access for writing FIFO 3148 with packet data not originating frommulti-sink port 3112. Sink port 3052 allocates 1 access for writingpacket data originating from multi-sink port 3112. Sink port 3052reserves 1 cycle for output port 3152 to read data from FIFO 3148. Inone such embodiment, sink port 3052 only allows concurrent reception of6 packets from rings 3060, 3062, and 3064 and 1 packet from multi-sinkport interface 3114.

G. Multi-Sink Port

FIG. 43 depicts a design for multi-sink port 3112 in one embodiment ofthe present invention. Multi-sink port 3112 is very similar to the sinkport 3052 architecture and operation shown in FIGS. 41 and 42. Theelements in FIG. 43 with the same reference numbers as elements in FIG.41 operate the same, with the following exception. Ring interface 3132does not accept configuration packets targeting ports other thanmulti-sink port 3112.

In multi-sink port 3112, sink request port 3183 and lookup table 3185replace output port 3152 from sink port 3052. Lookup table 3185 containsthe contents of the Multicast Registers described above with referenceto the configuration registers for multi-sink port 3112 (TableII)—configuration block 3130 passes Multicast Register information tolook-up table 3185 and maintains the other configuration registers formulti-sink port 3112. Sink request port 3183 is coupled to FIFO 3148 toretrieve packet data and FIFO request logic 3146 to receive a signalindicating whether FIFO 3148 is empty. Sink request port 3183 retrievesdata from FIFO 3148 when FIFO 3148 is not empty. Sink request port 3183forwards the retrieved packet data to sink ports targeted to receive thepacket data. Sink request port 3183 is coupled to lookup table 3185 toidentify the sink ports targeted by the packet.

Sink request port 3183 supplies packet data on sink port interface 3114.Sink port interface 3114 includes 2 separate buses. One bus carriespacket data to sink ports that first respond to a data transfer requestfrom multi-sink port 3112. The other bus provides the same packet datato sink ports that accept the request from multi-sink port 3112 at alater time. In one embodiment, each bus in interface 3114 includes an 8byte wide data path and the control signals identified above for datarings 3060, 3062, and 3064. In order to establish communication with thesink ports, interface 3114 also includes request and acknowledgementsignals.

FIG. 44 illustrates a series of steps performed by sink request port3183 to transfer packets to sink ports in one embodiment of the presentinvention. Prior to the process shown in FIG. 44, multi-sink port 3112stores data into FIFO 3148 in port 3112 by employing the processdescribed above with reference to FIG. 42. Sink request port 3183retrieves a data packet from FIFO 3148 and determines the targeted sinkports for the packet (step 3190). Sink request port 3183 provides thepacket's Destination Address to lookup table 3185. Lookup table 3185employs a portion of the Destination Address to identify the targetedsink ports. In one embodiment, lookup table 3183 employs the 6 leastsignificant bits of the Destination Address to select a MulticastRegister, which identifies the sink ports corresponding to theDestination Address.

Sink request port 3183 asserts a request to the targeted sink ports oninterface 3114 (step 3192). Sink request port 3183 then waits for a sinkport acknowledgement (step 3194). Sink request port 3183 only allows therequest to remain outstanding for a predetermined period of time. In oneembodiment, a user configures this time period to either 1,500 or 9,000cycles of the internal clock for cross-bar switch 3110. While therequest is pending without acknowledgement, sink request port 3183monitors the elapsed request time to determine whether the predeterminedtime period has elapsed (step 3196). As long as the time period has notelapsed, sink request port 3183 continues to await an acknowledgement(step 3194). If the predetermined period of time elapses, sink requestport 3183 removes the requests and the multi-sink data packet is notforwarded (step 3210).

After an acknowledgement is received (step 3194), sink request port 3183transmits packet data to the accepting sink ports on the first bus ininterface 3114, along with the specified control signals (step 3198).After initiating the packet data transmission, sink request port 3183determines whether more sink port requests are outstanding (step 3200).If sink request port 3183 detects that all requested sink targets haveprovided an acknowledgement (step 3200), then the multi-sink datatransmission process is over

If sink request port 3183 determines that not all requested sink portshave provided an acknowledgement (step 3200), port 3183 waits for thepredetermined time period to elapse (step 3202). After the time periodelapses, sink request port 3180 determines whether any additional sinkports have acknowledged the request (step 3204). For each sink portissuing a late acknowledgement, sink request port transmits packet datato the port over the second bus in interface 3114, along with data ringcontrol signals (step 3206).

If there are no late acceptances, sink request port 3183 determineswhether any ports failed to respond to the pending request (step 3208).Sink request port 3183 makes this same determination after initiatingpacket data transmission to the late accepting sink ports. For each sinkport not acknowledging the request, sink request port 3183 removes therequest (step 3210). If there are no sink ports failing to acknowledgethe request, then the multi-sink port's requested data transfer iscomplete.

Multi-sink port 3112 repeats the above-described process for all datastored in FIFO 3148.

H. Bandwidth Allocation

Bandwidth allocation circuit 3134 (FIG. 41) monitors traffic flowingthrough sink port 3052 and manages the bandwidth allocated to differentdata packet priority levels. In multi-sink port 3112, bandwidthallocation circuit 3134 (FIG. 43) performs the same function. Theoperation of bandwidth allocation circuit 3134 is described below withreference to sink port 3052. The same operation applies to sink ports3054, 3055, 3056, 3057, and 3058, as well as multi-sink port 3112.

Data packets arrive at cross-bar switch 3010 with a Priority Level fieldin their headers (See Table III). Bandwidth allocation circuit 3134instructs ring interface circuit 3132 to reject packets with prioritylevels receiving more bandwidth than allotted. Ring interface 3132employs these instructions to reject new incoming packets during theacceptance step (step 3164) described above with reference to FIG. 42.In one embodiment, bandwidth allocation circuit 3134 doesn't call forthe rejection of any priority levels until the number of bytes in FIFO3148 exceeds a predetermined threshold and multiple priority levelsappear at ring interface 3132.

FIG. 45 illustrates a series of steps performed by bandwidth allocationcircuit 3134 in sink port 3052 and multi-sink port 3112 in oneembodiment of the present invention. In configuring the sink port ormulti-sink port for bandwidth allocation, a user configures the port tohave three threshold values for FIFO 3148 (See Tables I and II—FIFOThresholds field). A user provides these threshold values in a writecommand configuration packet for entry into the port's configurationregisters.

As packets pass through ring interface 3132, bandwidth allocationcircuit 3134 records the amount of packet traffic for each prioritylevel for a fixed time window (step 3220). Bandwidth allocation circuit134 also maintains historic traffic counts for each priority level. Inone embodiment, the time window is approximately half the size of FIFO3148 (approximately 16K bytes in one embodiment), and four historicaltime window periods are maintained. In alternate embodiments, the timewindow period and the number of historical time window periods aremodified. A greater number of historical time periods decreases thesignificance of the traffic in the current time period in allocatingbandwidth. In one embodiment, there are 4 possible priority levels, andthe priority level for a packet appears in the packet's header (SeeTable III). In one such embodiment, bandwidth allocation circuit 3134records packet traffic for each priority level using the Size field inpacket headers.

Bandwidth allocation circuit 3134 calculates a weighted averagebandwidth (“WAB”) for each priority level (step 3222). Sink port 3052and multi-sink port 3112 are configured to have a Priority WeightingValue (“PWV”) for each priority level (See Tables I and II). Bandwidthallocation circuit 3134 calculates the WAB for each priority by dividingthe sum of the priority's recorded traffic for the current andhistorical time window periods by the priority's PWV.

After performing WAB calculations (step 3222), bandwidth allocationcircuit 3134 makes a series of determinations. Bandwidth allocationcircuit 3134 determines whether the lowest FIFO threshold value(Threshold 1) has been surpassed and more than 1 WAB value is greaterthan 0—indicating that more than 1 priority level appears in thereceived data packets (step 3224). If these conditions are both true,bandwidth allocation circuit 3134 instructs ring interface 3132 toreject new incoming packets with a priority level matching the prioritylevel with the highest WAB value (step 3226). If either the FIFOthreshold or WAB condition isn't met, bandwidth allocation circuit 3134does not issue the rejection instruction.

Bandwidth allocation circuit 3134 also determines whether the secondhighest FIFO threshold value (Threshold 2) has been surpassed and morethan 2 WAB values are greater than 0—indicating that more than 2priority levels appear in the received data packets (step 3228). Ifthese conditions are both true, bandwidth allocation circuit 3134instructs ring interface 3132 to reject new incoming packets with apriority level matching the priority level with the second highest WABvalue (step 3230). If either condition is not met, bandwidth allocationcircuit 3134 does not issue the rejection instruction.

Bandwidth allocation circuit 3134 also determines whether the highestFIFO threshold value (Threshold 3) has been surpassed and more than 3WAB values are greater than 0—indicating that more than 3 prioritylevels appear in the received data packets (step 3232). If theseconditions are both true, bandwidth allocation circuit 3134 instructsring interface 3132 to reject new incoming packets with a priority levelmatching the priority level with the third highest WAB value (step3234). If either condition fails, bandwidth allocation circuit 3134 doesnot issue the rejection instruction. In one embodiment, bandwidthallocation circuit 3134 performs the above-described tests and issuesrejection instructions on a free running basis.

Ring interface 3132 responds to a rejection instruction from bandwidthallocation circuit 3134 by refusing to accept packets with identifiedpriority levels. Ring interface 3132 continues rejecting the packets fora predetermined period of time. In one embodiment, the predeterminedtime period is 6000 cycles of the port's clock.

The following provides an example of bandwidth allocation circuit 3134in operation. FIFO 3148 has 32,000 bytes, and the FIFO thresholds are asfollows: 1) Threshold 1 is 18,000 bytes; 2) Threshold 2 is 20,000 bytes;and 3) Threshold 3 is 28,000 bytes. The priority weighting values are asfollows: 1) PWV for Priority 1 is 16; 2) PWV for Priority 2 is 8; 3) PWVfor Priority 3 is 4; and 4) PWV for Priority 4 is 128.

The sum of the recorded traffic in the current time window and fourhistorical time windows for each priority is 128 bytes, and FIFO 3148contains 19,000 bytes. The WAB values are as follows: 1) WAB forPriority 1 is 8; 2) WAB for Priority 2 is 16; 3) WAB for Priority 3 is32; and 4) WAB for Priority 4 is 1. This results in bandwidth allocationcircuit 3134 instructing ring interface 3132 to reject packets withpriority level 3—the priority level with the highest WAB value.

The foregoing detailed description of the invention has been presentedfor purposes of illustration and description. It is not intended to beexhaustive or to limit the invention to the precise form disclosed. Manymodifications and variations are possible in light of the aboveteaching. The described embodiments were chosen in order to best explainthe principles of the invention and its practical application to therebyenable others skilled in the art to best utilize the invention invarious embodiments and with various modifications as are suited to theparticular use contemplated. It is intended that the scope of theinvention be defined by the claims appended hereto.

1. A network device comprising: a plurality of blades, each bladecomprising a physical card having a plurality of compute elementsinterconnected by a hardware switching fabric to communicate packet databetween the compute elements, wherein the set of compute elements ofeach of the blades performs a set of network services on the packetdata, and wherein the set of compute elements in each of the blades isarranged in a processing pipeline to provide the set of networkservices; a flow control element to receive a plurality of packet flowsfrom a network and distribute each of the plurality of packet flows to acorresponding one of the processing pipelines provided by the blades,wherein the flow control element distributes packets of the same packetflow to the same processing pipeline of the blades, wherein the flowcontrol element identifies each of the packet flows as being associatedwith a subscriber and determines a subset of the network services thatare required to be applied to packet flows associated with theidentified subscriber, and wherein, for each of the packet flows, theflow control element selects one of the processing pipelines based onthe subset of network services identified for the subscriber.
 2. Thenetwork device of claim 1, further comprising a forwarding table storedwithin the network device that defines the processing pipelines as aplurality of different routes through the compute elements of thenetwork device, the routes defining different sets of one or more of thenetwork services and specifying an order for applying the networkservices.
 3. The network device of claim 2, wherein, in response toreceiving a data packet of one of the packet flows, the flow controlelement selects one of the routes based on the subset of networkservices identified as associated with the subscriber and attaches aroute tag to the packet to identify the selected route.
 4. The networkdevice of claim 3, wherein the route tag causes the data packet to beforwarded within the network device to a first one of the computeelements in the selected processing pipeline and causes output from oneof the compute elements in the processing pipeline to be forwarded to anext compute element in the processing pipeline along the selected routethrough the compute elements for performing the subset of the servicesassociated with the identified subscriber.
 5. The network device ofclaim 1, wherein the set of network services performed by the computeelements includes firewall protection, Network Address Translation,Internet Protocol forwarding, bandwidth management, Secure Sockets Layeroperations, Web caching, Web switching, and virtual private networking.6. The network device of claim 1, wherein each of said compute elementsis optimized to perform one of said set of services.
 7. The networkdevice of claim 1, wherein each of said compute elements performs allsaid services in said set.